Fix a scrollbar sizing issue
authorMatthias Clasen <mclasen@redhat.com>
Sat, 25 Jan 2020 20:05:14 +0000 (15:05 -0500)
committerMatthias Clasen <mclasen@redhat.com>
Sat, 25 Jan 2020 20:05:14 +0000 (15:05 -0500)
The recent Adwaita changes inadvertendly made scrollbars
resize on hover. Fix that, by reinstating some lost rules.

gtk/theme/Adwaita/_common.scss
gtk/theme/Adwaita/gtk-contained-dark.css
gtk/theme/Adwaita/gtk-contained.css

index 3fd9645c79a6f549bd111c3211397394ee3eac2d..3a36ec4dff7e990a94e5fa5ca84ea315965d17d6 100644 (file)
@@ -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; }
 }
 
index 4059a5b2007ce690fcab7b8353af05c7ba549b87..303eb003732148f470870c88b624fc5e7a4abe12 100644 (file)
@@ -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; }
index 39183d71a78cdcdd4fdf7e620bdbe9e617e4518e..f0e84ed8d1b99ebd5c681b08a35458a8bbe90e6e 100644 (file)
@@ -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; }