[gtk] Fix a scrollbar sizing issue



commit 03595f9567d174d3f4d8c70ebb9a1ec126633fdb
Author: Matthias Clasen <mclasen redhat com>
Date:   Sat Jan 25 15:05:14 2020 -0500

    Fix a scrollbar sizing issue
    
    The recent Adwaita changes inadvertendly made scrollbars
    resize on hover. Fix that, by reinstating some lost rules.

 gtk/theme/Adwaita/_common.scss           | 15 ++++++++++++++-
 gtk/theme/Adwaita/gtk-contained-dark.css |  4 ++++
 gtk/theme/Adwaita/gtk-contained.css      |  4 ++++
 3 files changed, 22 insertions(+), 1 deletion(-)
---
diff --git a/gtk/theme/Adwaita/_common.scss b/gtk/theme/Adwaita/_common.scss
index 3fd9645c79..3a36ec4dff 100644
--- a/gtk/theme/Adwaita/_common.scss
+++ b/gtk/theme/Adwaita/_common.scss
@@ -2276,6 +2276,20 @@ scrollbar {
         background-color: $fg_color;
         border: 1px solid if($variant == 'light', white, black);
       }
+
+      &.horizontal {
+        > range > trough > slider {
+          margin: 0 2px;
+          min-width: $_slider_min_length;
+        }
+      }
+
+      &.vertical {
+        > range > trough > slider {
+          margin: 2px 0;
+          min-height: $_slider_min_length;
+        }
+      }
     }
 
     &.dragging,
@@ -2283,7 +2297,6 @@ scrollbar {
   }
 
   &.horizontal > range > trough > slider { min-width: $_slider_min_length; }
-
   &.vertical > range > trough > slider { min-height: $_slider_min_length; }
 }
 
diff --git a/gtk/theme/Adwaita/gtk-contained-dark.css b/gtk/theme/Adwaita/gtk-contained-dark.css
index 4059a5b200..303eb00373 100644
--- a/gtk/theme/Adwaita/gtk-contained-dark.css
+++ b/gtk/theme/Adwaita/gtk-contained-dark.css
@@ -883,6 +883,10 @@ scrollbar.overlay-indicator:not(.dragging):not(.hovering) { border-color: transp
 
 scrollbar.overlay-indicator:not(.dragging):not(.hovering) > range > trough > slider { margin: 0; min-width: 
3px; min-height: 3px; background-color: #eeeeec; border: 1px solid black; }
 
+scrollbar.overlay-indicator:not(.dragging):not(.hovering).horizontal > range > trough > slider { margin: 0 
2px; min-width: 40px; }
+
+scrollbar.overlay-indicator:not(.dragging):not(.hovering).vertical > range > trough > slider { margin: 2px 
0; min-height: 40px; }
+
 scrollbar.overlay-indicator.dragging, scrollbar.overlay-indicator.hovering { opacity: 0.8; }
 
 scrollbar.horizontal > range > trough > slider { min-width: 40px; }
diff --git a/gtk/theme/Adwaita/gtk-contained.css b/gtk/theme/Adwaita/gtk-contained.css
index 39183d71a7..f0e84ed8d1 100644
--- a/gtk/theme/Adwaita/gtk-contained.css
+++ b/gtk/theme/Adwaita/gtk-contained.css
@@ -891,6 +891,10 @@ scrollbar.overlay-indicator:not(.dragging):not(.hovering) { border-color: transp
 
 scrollbar.overlay-indicator:not(.dragging):not(.hovering) > range > trough > slider { margin: 0; min-width: 
3px; min-height: 3px; background-color: #2e3436; border: 1px solid white; }
 
+scrollbar.overlay-indicator:not(.dragging):not(.hovering).horizontal > range > trough > slider { margin: 0 
2px; min-width: 40px; }
+
+scrollbar.overlay-indicator:not(.dragging):not(.hovering).vertical > range > trough > slider { margin: 2px 
0; min-height: 40px; }
+
 scrollbar.overlay-indicator.dragging, scrollbar.overlay-indicator.hovering { opacity: 0.8; }
 
 scrollbar.horizontal > range > trough > slider { min-width: 40px; }


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