[gnome-boxes] display-page: Make use of 'linked' style



commit 8a1290ece56ddf6f6624e811343bf845c0f41b29
Author: Zeeshan Ali (Khattak) <zeeshanak gnome org>
Date:   Thu Dec 12 19:05:05 2013 +0000

    display-page: Make use of 'linked' style
    
    Instead of using '0' spacing between fullscreen/restore & properties
    buttons, put them in a box and set 'linked' style on the box.
    
    This fixes the issue of fullscreen/restore button being chopped on the
    left side.
    
    https://bugzilla.gnome.org/show_bug.cgi?id=707293

 src/display-page.vala |    9 +++++++--
 1 files changed, 7 insertions(+), 2 deletions(-)
---
diff --git a/src/display-page.vala b/src/display-page.vala
index 8403cc1..82cefa8 100644
--- a/src/display-page.vala
+++ b/src/display-page.vala
@@ -6,6 +6,8 @@ private class Boxes.DisplayToolbar: Gtk.HeaderBar {
     private bool overlay;
     private bool handle_drag; // Handle drag events to (un)fulscreen the main window
 
+    Gtk.Box end_button_box;
+
     public DisplayToolbar (bool overlay, bool handle_drag) {
         add_events (Gdk.EventMask.POINTER_MOTION_MASK |
                     Gdk.EventMask.BUTTON_PRESS_MASK |
@@ -16,13 +18,16 @@ private class Boxes.DisplayToolbar: Gtk.HeaderBar {
         if (overlay) {
             get_style_context ().add_class ("toolbar");
             get_style_context ().add_class ("osd");
-            spacing = 0;
         } else {
             get_style_context ().add_class (Gtk.STYLE_CLASS_MENUBAR);
             show_close_button = true;
         }
         get_style_context ().add_class ("titlebar");
 
+        end_button_box = new Gtk.Box (Gtk.Orientation.HORIZONTAL, 0);
+        pack_end (end_button_box);
+        end_button_box.get_style_context ().add_class ("linked");
+
         var back_icon = (get_direction () == Gtk.TextDirection.RTL)? "go-previous-rtl-symbolic" :
                                                                      "go-previous-symbolic";
         var back = add_image_button (back_icon, true);
@@ -51,7 +56,7 @@ private class Boxes.DisplayToolbar: Gtk.HeaderBar {
         if (pack_start)
             this.pack_start (button);
         else
-            this.pack_end (button);
+            end_button_box.pack_end (button);
 
         if (!overlay)
             button.get_style_context ().add_class ("raised");


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