From 7a8bc7d599fe3440b925980f7d821f7d42874d43 Mon Sep 17 00:00:00 2001 From: Rory MacQueen Date: Tue, 17 Sep 2013 16:10:16 -0700 Subject: Removed unnecessary frame on category page --- wikipedia/PrebuiltCategoryPage.js | 14 +++++--------- wikipedia/views/domain_wiki_view.js | 4 +++- 2 files changed, 8 insertions(+), 10 deletions(-) diff --git a/wikipedia/PrebuiltCategoryPage.js b/wikipedia/PrebuiltCategoryPage.js index 85484b9..827bca9 100644 --- a/wikipedia/PrebuiltCategoryPage.js +++ b/wikipedia/PrebuiltCategoryPage.js @@ -53,11 +53,6 @@ const PrebuiltCategoryPage = new Lang.Class({ this._title = null; this._description = null; - this._frame = new Gtk.Frame({ - name: "category_frame", - expand: true, - }); - this._layout_grid = new Gtk.Grid({ orientation: Gtk.Orientation.HORIZONTAL, expand: true, @@ -127,12 +122,13 @@ const PrebuiltCategoryPage = new Lang.Class({ this._layout_grid.add(this._splash_separator); this._layout_grid.add(this._vbox); - this._overlay = new Gtk.Overlay({halign:Gtk.Align.END}); + this._overlay = new Gtk.Overlay({ + halign:Gtk.Align.END + }); this._overlay.add(this._layout_grid); this._overlay.add_overlay(this._submenu_separator); - this._frame.add(this._overlay); - this.add(this._frame); + this.add(this._overlay); this._category_provider = new Gtk.CssProvider(); }, @@ -165,7 +161,7 @@ const PrebuiltCategoryPage = new Lang.Class({ this._image_uri = value; let frame_css = "#category_frame{background-image: url('" + value + "');background-repeat:no-repeat;background-size:cover;}"; this._category_provider.load_from_data(frame_css); - let context = this._frame.get_style_context(); + let context = this.get_style_context(); context.add_provider(this._category_provider, Gtk.STYLE_PROVIDER_PRIORITY_APPLICATION); } }); \ No newline at end of file diff --git a/wikipedia/views/domain_wiki_view.js b/wikipedia/views/domain_wiki_view.js index 29f638a..bddaa7b 100644 --- a/wikipedia/views/domain_wiki_view.js +++ b/wikipedia/views/domain_wiki_view.js @@ -129,7 +129,9 @@ const DomainWikiView = new Lang.Class({ this._category_page = new Gtk.Grid({ orientation: Gtk.Orientation.HORIZONTAL }); - this._category_view = new EndlessWikipedia.PrebuiltCategoryPage(); + this._category_view = new EndlessWikipedia.PrebuiltCategoryPage({ + name: "category_frame" + }); // _category_article_list is eventually going to be the same widget as // _article_list, so that's why it's not built into the // PrebuiltCategoryPage -- cgit v1.2.3