[geary/wip/714793-orientation2: 5/6] Fix frame borders in vertical orientation



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

    Fix frame borders in vertical orientation

 src/client/components/main-window.vala |   25 +++++++++++++++++--------
 1 files changed, 17 insertions(+), 8 deletions(-)
---
diff --git a/src/client/components/main-window.vala b/src/client/components/main-window.vala
index 52e0799..b83c1c6 100644
--- a/src/client/components/main-window.vala
+++ b/src/client/components/main-window.vala
@@ -144,14 +144,17 @@ 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;
@@ -164,12 +167,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;
                   }
             """;
         }
@@ -191,7 +200,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);
         
         // message list
@@ -201,7 +210,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);
         
         // Three-pane display.


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