← Back to team overview

elementaryart team mailing list archive

[Merge] lp:~agent00tai/granite/fix-bug994797 into lp:granite

 

Fabian Thoma has proposed merging lp:~agent00tai/granite/fix-bug994797 into lp:granite.

Requested reviews:
  elementary Pantheon team (elementary-pantheon)
Related bugs:
  Bug #994797 in Granite: "remove hr from sidepanel"
  https://bugs.launchpad.net/granite/+bug/994797

For more details, see:
https://code.launchpad.net/~agent00tai/granite/fix-bug994797/+merge/106533

As Bug 994797 describes:
the new content-view side panel looks super sexy, but the horizontal separator on the tabs mess it up. Since there is nothing above the tabs, there is no need to have a separator here.

Because of that I added a parameter to hide the seperator:

public StaticNotebook (bool show_separator = true)
-- 
https://code.launchpad.net/~agent00tai/granite/fix-bug994797/+merge/106533
Your team elementaryart (old) is subscribed to branch lp:granite.
=== modified file 'lib/Widgets/StaticNotebook.vala'
--- lib/Widgets/StaticNotebook.vala	2012-01-22 11:27:54 +0000
+++ lib/Widgets/StaticNotebook.vala	2012-05-20 15:49:18 +0000
@@ -36,7 +36,7 @@
 
         public signal void page_changed (int index);
 
-        public StaticNotebook () {
+        public StaticNotebook (bool show_separator = true) {
 
             orientation = Gtk.Orientation.VERTICAL;
             switcher_hidden = false;
@@ -47,12 +47,17 @@
             switcher = new ModeButton();
 
             switcher_box = new Gtk.Box(Gtk.Orientation.HORIZONTAL, 0);
-            var left_separator = new Gtk.Separator(Gtk.Orientation.HORIZONTAL);
-            var right_separator = new Gtk.Separator(Gtk.Orientation.HORIZONTAL);
-
-            switcher_box.pack_start(left_separator, true, true);
-            switcher_box.pack_start(switcher, false, false);
-            switcher_box.pack_end(right_separator, true, true);
+            
+            if (show_separator) {
+                var left_separator = new Gtk.Separator(Gtk.Orientation.HORIZONTAL);
+                var right_separator = new Gtk.Separator(Gtk.Orientation.HORIZONTAL);
+                switcher_box.pack_start(left_separator, true, true);
+                switcher_box.pack_start(switcher, false, false);
+                switcher_box.pack_end(right_separator, true, true);
+            } else {
+                switcher.halign = Gtk.Align.CENTER;
+                switcher_box.pack_start(switcher, true, true);
+            }
 
             switcher.set_margin_top(5);
             switcher.set_margin_bottom(5);


Follow ups