[gtk+] Adwaita: make the paned wide separator scss code correct



commit 4355cb45d799d188abe8e17ae4e192dc40336ba9
Author: Lapo Calamandrei <calamandrei gmail com>
Date:   Sat Jan 9 13:04:27 2016 +0100

    Adwaita: make the paned wide separator scss code correct
    
    unfortunatelly the results are not, borders behaves in a weird way
    here as well, if this don't get fixed I'll rely on background here
    too.

 gtk/theme/Adwaita/_common.scss           |   36 +++++++++++++++++++++--------
 gtk/theme/Adwaita/gtk-contained-dark.css |   23 +++++++++++++-----
 gtk/theme/Adwaita/gtk-contained.css      |   23 +++++++++++++-----
 3 files changed, 58 insertions(+), 24 deletions(-)
---
diff --git a/gtk/theme/Adwaita/_common.scss b/gtk/theme/Adwaita/_common.scss
index 3693505..75d74b0 100644
--- a/gtk/theme/Adwaita/_common.scss
+++ b/gtk/theme/Adwaita/_common.scss
@@ -3047,12 +3047,26 @@ paned {
     min-width: 1px;
     min-height: 1px;
     -gtk-icon-source: none; // defeats the ugly default handle decoration
+    border-style: none; // just to be sure
     background-color: transparent;
+    // using background istead of a border since the border will get rendered twice (?)
     background-image: linear-gradient(to top, $borders_color);
     background-size: 1px 1px;
-    &:selected { background-image: linear-gradient(to top, $selected_bg_color); }
+
+    &:selected { background-image: linear-gradient(to top, $selected_bg_color); } // FIXME is this needed?
     &:backdrop { background-image: linear-gradient(to top, $backdrop_borders_color); }
+
+    &.wide {
+      margin: 0;
+      padding: 0;
+      min-width: 5px;
+      min-height: 5px;
+      background-image: none;
+      border: 1px solid $borders_color;
+      &:backdrop { border-color: $backdrop_borders_color; }
+    }
   }
+
   &.horizontal > separator {
     background-repeat: repeat-y;
     &:dir(ltr) {
@@ -3065,21 +3079,23 @@ paned {
       padding: 0 0 0 8px;
       background-position: right;
     }
+
+    &.wide {
+      border-top-style: none;
+      border-bottom-style: none;
+    }
   }
+
   &.vertical > separator {
     margin: 0 0 -8px 0;
     padding: 0 0 8px 0;
     background-repeat: repeat-x;
     background-position: top;
-  }
-  > separator.wide {
-    // FIXME: I don't understand this clearly
-    min-width: 5px;
-    min-height: 5px;
-    background-color: transparent;
-    border-style: none solid;
-    border-color: $borders_color;
-    border-width: 1px;
+
+    &.wide {
+      border-left-style: none;
+      border-right-style: none;
+    }
   }
 }
 
diff --git a/gtk/theme/Adwaita/gtk-contained-dark.css b/gtk/theme/Adwaita/gtk-contained-dark.css
index 57b91c9..5c28838 100644
--- a/gtk/theme/Adwaita/gtk-contained-dark.css
+++ b/gtk/theme/Adwaita/gtk-contained-dark.css
@@ -4197,6 +4197,7 @@ paned > separator {
   min-width: 1px;
   min-height: 1px;
   -gtk-icon-source: none;
+  border-style: none;
   background-color: transparent;
   background-image: linear-gradient(to top, #1c1f1f);
   background-size: 1px 1px; }
@@ -4204,6 +4205,15 @@ paned > separator {
     background-image: linear-gradient(to top, #215d9c); }
   paned > separator:backdrop {
     background-image: linear-gradient(to top, #1f2222); }
+  paned > separator.wide {
+    margin: 0;
+    padding: 0;
+    min-width: 5px;
+    min-height: 5px;
+    background-image: none;
+    border: 1px solid #1c1f1f; }
+    paned > separator.wide:backdrop {
+      border-color: #1f2222; }
 paned.horizontal > separator {
   background-repeat: repeat-y; }
   paned.horizontal > separator:dir(ltr) {
@@ -4214,18 +4224,17 @@ paned.horizontal > separator {
     margin: 0 0 0 -8px;
     padding: 0 0 0 8px;
     background-position: right; }
+  paned.horizontal > separator.wide {
+    border-top-style: none;
+    border-bottom-style: none; }
 paned.vertical > separator {
   margin: 0 0 -8px 0;
   padding: 0 0 8px 0;
   background-repeat: repeat-x;
   background-position: top; }
-paned > separator.wide {
-  min-width: 5px;
-  min-height: 5px;
-  background-color: transparent;
-  border-style: none solid;
-  border-color: #1c1f1f;
-  border-width: 1px; }
+  paned.vertical > separator.wide {
+    border-left-style: none;
+    border-right-style: none; }
 
 /**************
  * GtkInfoBar *
diff --git a/gtk/theme/Adwaita/gtk-contained.css b/gtk/theme/Adwaita/gtk-contained.css
index 8ff444d..373a2a5 100644
--- a/gtk/theme/Adwaita/gtk-contained.css
+++ b/gtk/theme/Adwaita/gtk-contained.css
@@ -4373,6 +4373,7 @@ paned > separator {
   min-width: 1px;
   min-height: 1px;
   -gtk-icon-source: none;
+  border-style: none;
   background-color: transparent;
   background-image: linear-gradient(to top, #9d9d99);
   background-size: 1px 1px; }
@@ -4380,6 +4381,15 @@ paned > separator {
     background-image: linear-gradient(to top, #4a90d9); }
   paned > separator:backdrop {
     background-image: linear-gradient(to top, #a5a5a1); }
+  paned > separator.wide {
+    margin: 0;
+    padding: 0;
+    min-width: 5px;
+    min-height: 5px;
+    background-image: none;
+    border: 1px solid #9d9d99; }
+    paned > separator.wide:backdrop {
+      border-color: #a5a5a1; }
 paned.horizontal > separator {
   background-repeat: repeat-y; }
   paned.horizontal > separator:dir(ltr) {
@@ -4390,18 +4400,17 @@ paned.horizontal > separator {
     margin: 0 0 0 -8px;
     padding: 0 0 0 8px;
     background-position: right; }
+  paned.horizontal > separator.wide {
+    border-top-style: none;
+    border-bottom-style: none; }
 paned.vertical > separator {
   margin: 0 0 -8px 0;
   padding: 0 0 8px 0;
   background-repeat: repeat-x;
   background-position: top; }
-paned > separator.wide {
-  min-width: 5px;
-  min-height: 5px;
-  background-color: transparent;
-  border-style: none solid;
-  border-color: #9d9d99;
-  border-width: 1px; }
+  paned.vertical > separator.wide {
+    border-left-style: none;
+    border-right-style: none; }
 
 /**************
  * GtkInfoBar *


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