diff options
author | Fernando Farfan <fernando@endlessm.com> | 2013-06-10 15:32:59 -0700 |
---|---|---|
committer | Fernando Farfan <fernando@endlessm.com> | 2013-06-17 14:17:43 -0700 |
commit | 7c96cbbe6ccb9a88b836bc89225fcf2c94fb1cb6 (patch) | |
tree | f641c34608df253d67d45c218384f3b43336188d /test | |
parent | 87ceaf572639a1a35e7112747698cb85f9c210fb (diff) |
Added support for left topbar and center topbar.
Modified EosPageManager, EosTopbar and EosWindow to have support for the two new topbars.
app-window.js includes some tests for these two widgets.
[endlessm/eos-sdk#97]
Diffstat (limited to 'test')
-rw-r--r-- | test/smoke-tests/app-window.js | 40 |
1 files changed, 40 insertions, 0 deletions
diff --git a/test/smoke-tests/app-window.js b/test/smoke-tests/app-window.js index e05ae5a..3f8f79f 100644 --- a/test/smoke-tests/app-window.js +++ b/test/smoke-tests/app-window.js @@ -108,6 +108,36 @@ const Toolbox = new Lang.Class ({ } }); +const LeftTopbar = new Lang.Class ({ + Name: 'LeftTopBar', + Extends: Gtk.Grid, + + _init: function(props) { + props = props || {}; + props.orientation = Gtk.Orientation.VERTICAL; + this.parent(props); + + this._label = new Gtk.Label({ label: 'How big do we want the left topbar?' }); + + this.add(this._label); + } +}); + +const CenterTopbar = new Lang.Class ({ + Name: 'CenterTopBar', + Extends: Gtk.Grid, + + _init: function(props) { + props = props || {}; + props.orientation = Gtk.Orientation.VERTICAL; + this.parent(props); + + this._label = new Gtk.Label({ label: 'The Center Topbar' }); + + this.add(this._label); + } +}); + const TestApplication = new Lang.Class ({ Name: 'TestApplication', Extends: Endless.Application, @@ -154,15 +184,25 @@ const TestApplication = new Lang.Class ({ this._toolbox.switch2.active); })); + this._left_topbar = new LeftTopbar(); + + this._center_topbar = new CenterTopbar(); + this._pm.add(this._page0, { name: "page0", background_uri: CAT_BACKGROUND_PATH, custom_toolbox_widget: this._toolbox + + left_topbar_widget: this._left_topbar, + center_topbar_widget: this._center_topbar }); + this._pm.add(this._page1, { name: "page1", background_uri: DOG_BACKGROUND_PATH, + custom_toolbox_widget: this._toolbox, + left_topbar_widget: this._left_topbar, page_actions: true }); |