[geary] Fix frame borders in vertical orientation



commit 1aabd9a0698fa881c6d2c507b97ebcd53d371777
Author: Robert Schroll <rschroll gmail com>
Date:   Fri Feb 20 19:14:21 2015 -0500

    Fix frame borders in vertical orientation
    
    https://bugzilla.gnome.org/show_bug.cgi?id=714793

 src/client/components/main-window.vala |   24 +++++++++++++++++-------
 1 files changed, 17 insertions(+), 7 deletions(-)
---
diff --git a/src/client/components/main-window.vala b/src/client/components/main-window.vala
index ae4bb71..6f48e0b 100644
--- a/src/client/components/main-window.vala
+++ b/src/client/components/main-window.vala
@@ -145,15 +145,19 @@ public class MainWindow : Gtk.ApplicationWindow {
         Gtk.CssProvider provider = new Gtk.CssProvider();
         Gtk.StyleContext.add_provider_for_screen(Gdk.Display.get_default().get_default_screen(),
             provider, Gtk.STYLE_PROVIDER_PRIORITY_APPLICATION);
+        // Gtk < 3.14: No borders along top or left side of window
         string css = """
-            .folder_frame {
+            .folder-frame {
                 border-left-width: 0px;
                 border-top-width: 0px;
             }
-            .conversation_frame {
+            .sidebar-pane-separator.horizontal .conversation-frame {
                 border-top-width: 0px;
                 border-bottom-width: 0px;
             }
+            .sidebar-pane-separator.vertical .conversation-frame {
+                border-left-width: 0px;
+            }
             ComposerBox {
                 border: 16px solid #ccc;
                 box-shadow: 0 0 0 1px rgba(0,0,0,0.4) inset;
@@ -165,12 +169,18 @@ public class MainWindow : Gtk.ApplicationWindow {
         """;
         
         if(Gtk.MAJOR_VERSION >= 3 && Gtk.MINOR_VERSION >= 14) {
+            // Gtk >= 3.14: Borders only along status bar
             css += """
-                  .folder_frame {
+                  .folder-frame {
                       border-right-width: 0px;
                   }
-                  .conversation_frame {
-                      border-width: 0px;
+                  .sidebar-pane-separator.vertical .folder-frame {
+                      border-bottom-width: 0px;
+                  }
+                  .conversation-frame {
+                      border-top-width: 0px;
+                      border-left-width: 0px;
+                      border-right-width: 0px;
                   }
             """;
         }
@@ -192,7 +202,7 @@ public class MainWindow : Gtk.ApplicationWindow {
         folder_list_scrolled.add(folder_list);
         Gtk.Frame folder_frame = new Gtk.Frame(null);
         folder_frame.shadow_type = Gtk.ShadowType.IN;
-        folder_frame.get_style_context ().add_class ("folder_frame");
+        folder_frame.get_style_context ().add_class ("folder-frame");
         folder_frame.add(folder_list_scrolled);
         folder_box = new Gtk.Box(Gtk.Orientation.VERTICAL, 0);
         folder_box.pack_start(folder_frame, true, true);
@@ -204,7 +214,7 @@ public class MainWindow : Gtk.ApplicationWindow {
         conversation_list_scrolled.add(conversation_list_view);
         Gtk.Frame conversation_frame = new Gtk.Frame(null);
         conversation_frame.shadow_type = Gtk.ShadowType.IN;
-        conversation_frame.get_style_context ().add_class ("conversation_frame");
+        conversation_frame.get_style_context ().add_class ("conversation-frame");
         conversation_frame.add(conversation_list_scrolled);
         conversation_box = new Gtk.Box(Gtk.Orientation.VERTICAL, 0);
         conversation_box.pack_start(conversation_frame, true, true);


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