[gnome-clocks] Fix the toolbar lower border



commit 7eb9ba4fea70d18b476e325123b3dbe0f783ad1b
Author: Paolo Borelli <pborelli gnome org>
Date:   Wed Aug 15 19:15:36 2012 +0200

    Fix the toolbar lower border
    
    This makes the toolbar lower border look like the one of Documents etc.
    The darker border is done with css instead of inserting a separator.
    To see it work you will need Gtk 3.5.5 since previous versions were not
    honoring css border properties.
    
    https://bugzilla.gnome.org/show_bug.cgi?id=681932

 data/gtk-style.css |    7 ++++++-
 gnomeclocks/app.py |    6 ++----
 2 files changed, 8 insertions(+), 5 deletions(-)
---
diff --git a/data/gtk-style.css b/data/gtk-style.css
index 3706a51..eccc2fe 100644
--- a/data/gtk-style.css
+++ b/data/gtk-style.css
@@ -3,6 +3,12 @@
 @define-color clocks_lap_color #999999;
 @define-color clocks_stop_color #ff0000;
 
+.clocks-toolbar.toolbar {
+    border-style: solid;
+    border-width: 0 0 1px 0;
+    border-radius: 0;
+}
+
 .grey-bg {
     background-color: #f1f2f1
 }
@@ -17,7 +23,6 @@
     border-width: 0;
 }
 
-
 .clocks-continue:active {
     background-image: -gtk-gradient (linear,
                                      left bottom, left top, 
diff --git a/gnomeclocks/app.py b/gnomeclocks/app.py
index 64740c5..fc2b7e3 100644
--- a/gnomeclocks/app.py
+++ b/gnomeclocks/app.py
@@ -47,6 +47,7 @@ class Window(Gtk.ApplicationWindow):
         self.add(vbox)
         self.notebook = Gtk.Notebook()
         self.notebook.set_show_tabs(False)
+        self.notebook.set_show_border(False)
 
         self.toolbar = ClocksToolbar()
 
@@ -62,7 +63,6 @@ class Window(Gtk.ApplicationWindow):
         self.single_evbox = Gtk.EventBox()
 
         vbox.pack_end(self.notebook, True, True, 0)
-        vbox.pack_end(Gtk.Separator(), False, False, 1)
         for view in self.views:
             self.notebook.append_page(view, Gtk.Label(str(view)))
         self.notebook.append_page(self.single_evbox, Gtk.Label("Widget"))
@@ -142,9 +142,7 @@ class ClocksToolbar(Gtk.Toolbar):
 
     def __init__(self):
         Gtk.Toolbar.__init__(self)
-        #self.get_style_context().add_class("osd")
-        self.set_size_request(-1, 42)
-        self.get_style_context().add_class(Gtk.STYLE_CLASS_MENUBAR)
+        self.get_style_context().add_class("clocks-toolbar")
 
         toolitem = Gtk.ToolItem()
         toolitem.set_expand(True)



[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]