[gnome-documents] preview: move the fullscreen toolbar to preview.js
- From: Cosimo Cecchi <cosimoc src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gnome-documents] preview: move the fullscreen toolbar to preview.js
- Date: Thu, 19 Jul 2012 03:30:13 +0000 (UTC)
commit 82e731dee08286daf924aac81ee7c748c698be07
Author: Cosimo Cecchi <cosimoc gnome org>
Date: Wed Jul 18 10:45:44 2012 -0400
preview: move the fullscreen toolbar to preview.js
And rename it to PreviewFullscreenToolbar
src/mainToolbar.js | 25 -------------------------
src/preview.js | 27 ++++++++++++++++++++++++++-
2 files changed, 26 insertions(+), 26 deletions(-)
---
diff --git a/src/mainToolbar.js b/src/mainToolbar.js
index 5bd9d0a..4c68740 100644
--- a/src/mainToolbar.js
+++ b/src/mainToolbar.js
@@ -321,31 +321,6 @@ const MainToolbar = new Lang.Class({
}
});
-const PreviewToolbar = new Lang.Class({
- Name: 'PreviewToolbar',
- Extends: MainToolbar,
-
- _init: function() {
- this.parent();
-
- this.actor.y = -(this.widget.get_preferred_height()[1]);
- },
-
- show: function() {
- Tweener.addTween(this.actor,
- { y: 0,
- time: 0.20,
- transition: 'easeInQuad' });
- },
-
- hide: function() {
- Tweener.addTween(this.actor,
- { y: -(this.widget.get_preferred_height()[1]),
- time: 0.20,
- transition: 'easeOutQuad' });
- }
-});
-
const OverviewToolbar = new Lang.Class({
Name: 'OverviewToolbar',
Extends: MainToolbar,
diff --git a/src/preview.js b/src/preview.js
index 3523c32..1fc397d 100644
--- a/src/preview.js
+++ b/src/preview.js
@@ -219,7 +219,7 @@ const PreviewFullscreen = new Lang.Class({
factor: 0.95 }));
// create toolbar
- this._fsToolbar = new MainToolbar.PreviewToolbar();
+ this._fsToolbar = new PreviewFullscreenToolbar();
this._fsToolbar.setModel(model);
layout.add(this._fsToolbar.actor,
@@ -287,3 +287,28 @@ const PreviewFullscreen = new Lang.Class({
}));
}
});
+
+const PreviewFullscreenToolbar = new Lang.Class({
+ Name: 'PreviewFullscreenToolbar',
+ Extends: MainToolbar.MainToolbar,
+
+ _init: function() {
+ this.parent();
+
+ this.actor.y = -(this.widget.get_preferred_height()[1]);
+ },
+
+ show: function() {
+ Tweener.addTween(this.actor,
+ { y: 0,
+ time: 0.20,
+ transition: 'easeInQuad' });
+ },
+
+ hide: function() {
+ Tweener.addTween(this.actor,
+ { y: -(this.widget.get_preferred_height()[1]),
+ time: 0.20,
+ transition: 'easeOutQuad' });
+ }
+});
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]