From e9638cec453953e0ea29d59fe4a889ba74805c82 Mon Sep 17 00:00:00 2001 From: EliverLara Date: Wed, 24 Oct 2018 13:12:35 -0500 Subject: [PATCH] Fix progress bar gradient direction --- gtk-3.0/_drawing.scss | 4 ++++ gtk-3.0/gtk-dark.css | 5 ++++- gtk-3.0/gtk.css | 5 ++++- gtk-3.0/widgets/_progress-bars.scss | 4 ++-- gtk-3.0/widgets/_scales.scss | 5 +++-- 5 files changed, 17 insertions(+), 6 deletions(-) diff --git a/gtk-3.0/_drawing.scss b/gtk-3.0/_drawing.scss index be5f788..78e2f1e 100755 --- a/gtk-3.0/_drawing.scss +++ b/gtk-3.0/_drawing.scss @@ -593,3 +593,7 @@ box-shadow: none; border: none; box-shadow: none; } + +@mixin scale-highlight($dir) { + background: linear-gradient(to $dir, #fed349, #ff7800); +} diff --git a/gtk-3.0/gtk-dark.css b/gtk-3.0/gtk-dark.css index 053db01..b3ff469 100755 --- a/gtk-3.0/gtk-dark.css +++ b/gtk-3.0/gtk-dark.css @@ -3311,7 +3311,8 @@ progressbar { progressbar.horizontal progress { margin: 0; } progressbar.vertical progress { - margin: 0; } + margin: 0; + background: linear-gradient(to bottom, #fed349, #ff7800); } progressbar:backdrop { box-shadow: none; transition: 200ms ease-out; } @@ -3368,6 +3369,8 @@ scale { scale.vertical trough, scale.vertical progress { min-width: 6px; } + scale.vertical highlight { + background: linear-gradient(to bottom, #fed349, #ff7800); } scale slider { min-height: 15px; min-width: 15px; diff --git a/gtk-3.0/gtk.css b/gtk-3.0/gtk.css index 0969660..67865f6 100755 --- a/gtk-3.0/gtk.css +++ b/gtk-3.0/gtk.css @@ -3318,7 +3318,8 @@ progressbar { progressbar.horizontal progress { margin: 0; } progressbar.vertical progress { - margin: 0; } + margin: 0; + background: linear-gradient(to bottom, #fed349, #ff7800); } progressbar:backdrop { box-shadow: none; transition: 200ms ease-out; } @@ -3375,6 +3376,8 @@ scale { scale.vertical trough, scale.vertical progress { min-width: 6px; } + scale.vertical highlight { + background: linear-gradient(to bottom, #fed349, #ff7800); } scale slider { min-height: 15px; min-width: 15px; diff --git a/gtk-3.0/widgets/_progress-bars.scss b/gtk-3.0/widgets/_progress-bars.scss index c962fdc..2a872f1 100644 --- a/gtk-3.0/widgets/_progress-bars.scss +++ b/gtk-3.0/widgets/_progress-bars.scss @@ -13,8 +13,8 @@ progressbar { progress { min-width: 6px; } } - &.horizontal progress { margin: 0; } // the progress node is positioned after the trough border - &.vertical progress { margin: 0; } // this moves it over it. + &.horizontal progress { margin: 0;} // the progress node is positioned after the trough border + &.vertical progress { margin: 0; @include scale-highlight(bottom);} // this moves it over it. // FIXME: insensitive state missing and some other state should be set probably diff --git a/gtk-3.0/widgets/_scales.scss b/gtk-3.0/widgets/_scales.scss index 2381ca0..3352713 100644 --- a/gtk-3.0/widgets/_scales.scss +++ b/gtk-3.0/widgets/_scales.scss @@ -19,7 +19,7 @@ %scale_highlight { border: none; - background: linear-gradient(to right, #fed349, #ff7800); + @include scale-highlight(right); border-radius: 3px; margin: 0; @@ -54,7 +54,8 @@ scale { &.vertical { trough, - progress { min-width: 6px; } + progress { min-width: 6px;} + highlight { @include scale-highlight(bottom); } } // the slider is inside the trough, so to have make it bigger there's a negative margin