[gtk+/gtk-3-16] HC: implement overlay scrollbar theming



commit 3d9f024debbde527f65876e3ffd77406ca122f79
Author: Jakub Steiner <jimmac gmail com>
Date:   Mon May 4 14:39:40 2015 +0200

    HC: implement overlay scrollbar theming
    
    while the behavior was in place, the specific theming for
    overlay scrollbars was missing, and content was hidden.

 gtk/theme/HighContrast/_common.scss |   37 +++++++++++++++++++++++++++++++++++
 gtk/theme/HighContrast/gtk.css      |   19 ++++++++++++++++++
 2 files changed, 56 insertions(+), 0 deletions(-)
---
diff --git a/gtk/theme/HighContrast/_common.scss b/gtk/theme/HighContrast/_common.scss
index e15048a..cffaebc 100644
--- a/gtk/theme/HighContrast/_common.scss
+++ b/gtk/theme/HighContrast/_common.scss
@@ -1378,6 +1378,9 @@ GtkTreeView.view.progressbar { //Progressbar in treeview cells
 
   -GtkRange-stepper-spacing: 0;
   -GtkRange-trough-under-steppers: 1;
+  $_slider_margin: 3px;
+  $_slider_fine_tune_margin: 4px;
+  
   .button {
     border: none;
   }
@@ -1402,6 +1405,40 @@ GtkTreeView.view.progressbar { //Progressbar in treeview cells
       }
     }
   }
+  &.overlay-indicator {
+    &:not(.dragging):not(.hovering) { // Overlay scrolling indicator
+      opacity: 0.4;
+
+      -GtkRange-slider-width: 5px;
+
+      .slider {
+        margin: 0;
+        background-color: $fg_color;
+        border: 1px solid white;
+        background-clip: padding-box;
+      }
+
+      .trough {
+        border-style: none;
+        background-color: transparent;
+      }
+
+      // w/o the following margin tweaks the slider shrinks when hovering/dragging
+      &.vertical .slider {
+        margin-top: $_slider_margin - 1px;
+        margin-bottom: $_slider_margin - 1px;
+      }
+
+      &.horizontal .slider {
+        margin-left: $_slider_margin - 1px;
+        margin-right: $_slider_margin - 1px;
+      }
+
+    }
+
+    &.dragging,
+    &.hovering { opacity: 0.7; }
+  }
 }
 
 .scrollbars-junction { // the small square between two scrollbars
diff --git a/gtk/theme/HighContrast/gtk.css b/gtk/theme/HighContrast/gtk.css
index b03df43..d7ff632 100644
--- a/gtk/theme/HighContrast/gtk.css
+++ b/gtk/theme/HighContrast/gtk.css
@@ -1607,6 +1607,25 @@ GtkTreeView.view.progressbar {
       border-width: 5px; }
       .scrollbar.slider.fine-tune:prelight:active {
         background-color: #000; }
+  .scrollbar.overlay-indicator:not(.dragging):not(.hovering) {
+    opacity: 0.4;
+    -GtkRange-slider-width: 5px; }
+    .scrollbar.overlay-indicator:not(.dragging):not(.hovering) .slider {
+      margin: 0;
+      background-color: #000;
+      border: 1px solid white;
+      background-clip: padding-box; }
+    .scrollbar.overlay-indicator:not(.dragging):not(.hovering) .trough {
+      border-style: none;
+      background-color: transparent; }
+    .scrollbar.overlay-indicator:not(.dragging):not(.hovering).vertical .slider {
+      margin-top: 2px;
+      margin-bottom: 2px; }
+    .scrollbar.overlay-indicator:not(.dragging):not(.hovering).horizontal .slider {
+      margin-left: 2px;
+      margin-right: 2px; }
+  .scrollbar.overlay-indicator.dragging, .scrollbar.overlay-indicator.hovering {
+    opacity: 0.7; }
 
 .scrollbars-junction, .scrollbar.trough {
   border-color: transparent;


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