[gtk+] Adwaita: scale with marks style fixes



commit fde1aac57a0a2cd431bebfd74ef110ba9e9812eb
Author: Lapo Calamandrei <calamandrei gmail com>
Date:   Wed Mar 2 21:34:03 2016 +0100

    Adwaita: scale with marks style fixes
    
    after GtkRange gadgettification the theme needs some adjustments
    for the new widget structure.

 gtk/theme/Adwaita/_common.scss           |   22 +++++++++++++++++-----
 gtk/theme/Adwaita/gtk-contained-dark.css |   16 ++++++++++++----
 gtk/theme/Adwaita/gtk-contained.css      |   16 ++++++++++++----
 3 files changed, 41 insertions(+), 13 deletions(-)
---
diff --git a/gtk/theme/Adwaita/_common.scss b/gtk/theme/Adwaita/_common.scss
index 1aa69d6..f1437b6 100644
--- a/gtk/theme/Adwaita/_common.scss
+++ b/gtk/theme/Adwaita/_common.scss
@@ -2483,6 +2483,10 @@ treeview.view radio {
 
 scale {
   // sizing
+
+  $_marks_lenght: 6px;
+  $_marks_distance: 6px;
+
   min-height: 10px;
   min-width: 10px;
   padding: 12px;
@@ -2582,14 +2586,22 @@ scale {
     }
   }
 
-  marks { color: gtkalpha(currentColor, 0.4); }
-  &.horizontal mark indicator {
-    min-height: 8px;
+  marks {
+    color: gtkalpha(currentColor, 0.4);
+
+    &.top { margin-bottom: $_marks_distance; }
+    &.bottom { margin-top: $_marks_distance; }
+    &.left { margin-right: $_marks_distance; }
+    &.right { margin-left: $_marks_distance; }
+  }
+
+  &.horizontal  indicator {
+    min-height: $_marks_lenght;
     min-width: 1px;
   }
-  &.vertical mark indicator {
+  &.vertical indicator {
     min-height: 1px;
-    min-width: 8px;
+    min-width: $_marks_lenght;
   }
 
   // *WARNING* scale with marks madness following
diff --git a/gtk/theme/Adwaita/gtk-contained-dark.css b/gtk/theme/Adwaita/gtk-contained-dark.css
index bcfd477..3d61a26 100644
--- a/gtk/theme/Adwaita/gtk-contained-dark.css
+++ b/gtk/theme/Adwaita/gtk-contained-dark.css
@@ -2760,12 +2760,20 @@ scale {
         -gtk-icon-shadow: none; }
   scale marks {
     color: alpha(currentColor,0.4); }
-  scale.horizontal mark indicator {
-    min-height: 8px;
+    scale marks.top {
+      margin-bottom: 6px; }
+    scale marks.bottom {
+      margin-top: 6px; }
+    scale marks.left {
+      margin-right: 6px; }
+    scale marks.right {
+      margin-left: 6px; }
+  scale.horizontal indicator {
+    min-height: 6px;
     min-width: 1px; }
-  scale.vertical mark indicator {
+  scale.vertical indicator {
     min-height: 1px;
-    min-width: 8px; }
+    min-width: 6px; }
   scale.color.horizontal trough > trough > slider, scale.horizontal contents:last-child:not(:only-child) > 
trough > slider {
     margin: -9px;
     border-style: none;
diff --git a/gtk/theme/Adwaita/gtk-contained.css b/gtk/theme/Adwaita/gtk-contained.css
index ebc381c..90259c3 100644
--- a/gtk/theme/Adwaita/gtk-contained.css
+++ b/gtk/theme/Adwaita/gtk-contained.css
@@ -2791,12 +2791,20 @@ scale {
         -gtk-icon-shadow: none; }
   scale marks {
     color: alpha(currentColor,0.4); }
-  scale.horizontal mark indicator {
-    min-height: 8px;
+    scale marks.top {
+      margin-bottom: 6px; }
+    scale marks.bottom {
+      margin-top: 6px; }
+    scale marks.left {
+      margin-right: 6px; }
+    scale marks.right {
+      margin-left: 6px; }
+  scale.horizontal indicator {
+    min-height: 6px;
     min-width: 1px; }
-  scale.vertical mark indicator {
+  scale.vertical indicator {
     min-height: 1px;
-    min-width: 8px; }
+    min-width: 6px; }
   scale.color.horizontal trough > trough > slider, scale.horizontal contents:last-child:not(:only-child) > 
trough > slider {
     margin: -9px;
     border-style: none;


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