Adwaita: Avoid fine-tune scrollbars jumping
authorJakub Steiner <jimmac@gmail.com>
Mon, 15 Feb 2021 19:31:44 +0000 (20:31 +0100)
committerJakub Steiner <jimmac@gmail.com>
Tue, 16 Feb 2021 10:59:45 +0000 (11:59 +0100)
Fixes https://gitlab.gnome.org/GNOME/gtk/-/issues/3672

gtk/theme/Adwaita/_common.scss

index d084f53ef471491714fa3efdf764e42ad1cb2e45..ed26a7d29082e6f2036b08283182f509a0c11233 100644 (file)
@@ -2283,6 +2283,7 @@ scrollbar {
   $_slider_min_length: 40px;
   $_slider_width: 8px;
   $_scrollbar_transition: all 300ms $ease-out-quad;
+  $_fine-tune_slider_border: $_slider_width - 3; //#3672
 
   background-color: $scrollbar_bg_color;
   transition: $_scrollbar_transition;
@@ -2312,12 +2313,13 @@ scrollbar {
 
   > range.fine-tune {
     > trough > slider {
-      min-width: $_slider_width - 2;
-      min-height: $_slider_width - 2;
+      transition: none;
+      min-width: $_fine-tune_slider_border+1;
+      min-height: $_fine-tune_slider_border+1;
     }
 
-    &.horizontal > trough > slider { border-width: 6px 4px; }
-    &.vertical > trough > slider { border-width: 4px 6px; }
+    &.horizontal > trough > slider { border-width: $_fine-tune_slider_border 4px; }
+    &.vertical > trough > slider { border-width: 4px $_fine-tune_slider_border; }
   }
 
   &.overlay-indicator {