Improved sliders with marks, sliders in fine-tune

This commit is contained in:
Eudaimon 2022-04-23 11:17:56 +02:00
parent 36a201343b
commit 5a0ce409d8
9 changed files with 313 additions and 493 deletions

View file

@ -2622,36 +2622,31 @@ scale {
> fill,
> highlight { margin: -1px; }
// the slider is inside the trough, so to have make it bigger there's a negative margin
> slider {
min-height: 18px;
min-width: 18px;
margin: -9px;
}
}
// click-and-hold the slider to activate
&.fine-tune {
&.horizontal {
padding-top: 9px;
padding-bottom: 9px;
min-height: 16px;
}
//&.horizontal {
// padding-top: 9px;
// padding-bottom: 9px;
// min-height: 16px;
//}
&.vertical {
padding-left: 9px;
padding-right: 9px;
min-width: 16px;
}
//&.vertical {
// padding-left: 9px;
// padding-right: 9px;
// min-width: 16px;
//}
// to make the trough grow in fine-tune mode
> trough > slider { margin: -6px; }
// to make the trough grow in fine-tune mode //no longer, just background change
> trough > slider {&, &:active, &:hover, &:focus { background-color: $hint_bg;}} //margin: -6px; }
> trough > fill,
> trough > highlight,
> trough {
border-radius: 5px;
//border-radius: 5px;
}
}
@ -2685,7 +2680,10 @@ scale {
}
}
> trough > slider {
> trough > slider, %slider {
min-height: 18px;
min-width: 18px;
margin: -9px; // the slider is inside the trough, so to have make it bigger there's a negative margin
@include button(normal);
border-width: 1px;
border-style: solid;
@ -2746,14 +2744,14 @@ scale {
> value.left { margin-right: 9px; }
> value.right { margin-left: 9px; }
&.fine-tune >marks {
&.top { margin-top: 3px; }
&.bottom { margin-bottom: 3px; }
//&.fine-tune >marks {
// &.top { margin-top: 3px; }
// &.bottom { margin-bottom: 3px; }
indicator { min-height: ($_marks_length - 3px); }
}
&.marks-after {slider{ border-radius: 5px 5px 100% 100%;}}
&.marks-before {slider{ border-radius: 100% 100% 5px 5px;}}
// indicator { min-height: ($_marks_length - 3px); }
//}
&.marks-after {slider{ border-radius: 5px 5px 100% 100%;min-width: 10px; padding: 0; margin-right: 5px; margin-left:5px;}}
&.marks-before {slider{ border-radius: 100% 100% 5px 5px;min-width: 10px; padding: 0; margin-right: 5px; margin-left:5px;}}
}
@ -2773,14 +2771,14 @@ scale {
> value.top { margin-bottom: 9px; }
> value.bottom { margin-top: 9px; }
&.fine-tune >marks {
&.top { margin-left: 3px; }
&.bottom { margin-right: 3px; }
//&.fine-tune >marks {
// &.top { margin-left: 3px; }
// &.bottom { margin-right: 3px; }
indicator { min-height: ($_marks_length - 3px); }
}
&.marks-after {slider{ border-radius: 5px 100% 100% 5px;}}
&.marks-before {slider{ border-radius: 100% 5px 5px 100%;}}
// indicator { min-height: ($_marks_length - 3px); }
// }
&.marks-after {slider{ border-radius: 5px 100% 100% 5px;min-height: 10px;padding: 0;margin-top: 54px; margin-bottom:5px;}}
&.marks-before {slider{ border-radius: 100% 5px 5px 100%;min-height: 10px;padding: 0;margin-top: 5px; margin-bottom:5px;}}
}
// *WARNING* scale with marks madness following
@ -2854,53 +2852,7 @@ scale {
}
}
&.fine-tune {
&.horizontal {
&:dir(ltr), &:dir(rtl) { // specificity bump
padding: 0 0 12px 0;
> trough {
padding-bottom: 7px;
background-position: 0 -6px;
}
> trough > slider {
margin-bottom: -15px;
margin-top: 6px;
}
}
}
&.vertical {
&:dir(ltr) {
padding: 0 0 0 12px;
> trough {
padding-left: 7px;
background-position: 6px 0;
}
> trough > slider {
margin-left: -15px;
margin-right: 6px;
}
}
&:dir(rtl) {
padding: 0 12px 0 0;
> trough {
padding-right: 7px;
background-position: -6px 0;
}
> trough > slider {
margin-right: -15px;
margin-left: 6px;
}
}
}
}
//removed fine-tune bit
}
}
@ -3671,7 +3623,7 @@ tooltip {
&.background {
// background-color needs to be set this way otherwise it gets drawn twice
// see https://bugzilla.gnome.org/show_bug.cgi?id=736155 for details.
background-color: transparentize($hint_bg, 0.2);
background-color: transparentize($hint_bg, 0.1);
background-clip: padding-box;
border: 1px solid $tooltip_borders_color; // this subtle border is meant to
// not make the tooltip melt with
@ -3681,7 +3633,7 @@ tooltip {
padding: 6px 10px;
border-radius: $window_radius;
box-shadow: none; // otherwise it gets inherited by windowframe.csd
//box-shadow: none; // otherwise it gets inherited by windowframe.csd
> box {
border-spacing: 6px;
@ -3924,9 +3876,9 @@ window {
padding: 4px;
border: solid 1px $borders_color;
border-radius: 0;
box-shadow: inset 0 0 0 4px $borders_color, inset 0 0 0 3px $headerbar_bg_color, inset 0 1px $top_hilight, 0 1px 5px transparentize(black, 0.8);
box-shadow: inset 0 0 0 4px $borders_color, inset 0 0 0 3px $headerbar_bg_color, inset 0 1px $top_hilight, 0 3px 5px transparentize(black, 0.3);
&:backdrop { box-shadow: inset 0 0 0 4px $borders_color, inset 0 0 0 3px $backdrop_bg_color, inset 0 1px $top_hilight, 0 1px 5px transparentize(black, 0.8); }
&:backdrop { box-shadow: inset 0 0 0 4px $borders_color, inset 0 0 0 3px $backdrop_bg_color, inset 0 1px $top_hilight, 0 3px 5px transparentize(black, 0.3); }
}
&.maximized,
@ -3939,7 +3891,7 @@ window {
&.tiled-bottom {
border-radius: 0;
box-shadow: 0 0 0 1px $_wm_border,
0 2px 6px 2px transparentize(black, 0.8),
0 2px 6px 2px transparentize(black, 0.3),
0 0 0 20px transparent; //transparent control workaround -- #3670
&:backdrop { box-shadow: 0 0 0 1px $_wm_border_backdrop,
@ -3952,12 +3904,13 @@ window {
// server-side decorations as used by mutter
&.ssd { box-shadow: 0 0 0 1px $_wm_border; } //just doing borders, wm draws actual shadows
}
tooltip.csd {
border-radius: 5px;
box-shadow: none;
box-shadow: 0 3px 4px transparentize(black, 0.3); //none;
}
// catch all extend :)
@ -3971,40 +3924,8 @@ tooltip.csd {
* Touch Copy & Paste *
*********************/
//touch selection handlebars for the Popover.osd above
cursor-handle {
background-color: transparent;
background-image: none;
box-shadow: none;
border-style: none;
min-width: 20px;
min-height: 24px;
padding-left: 20px;
padding-right: 20px;
padding-top: 24px;
padding-bottom: 24px;
@each $s,$as in ('',''),
(':hover','-hover'),
(':active','-active') { //no need for insensitive and backdrop
&.top#{$s}:dir(ltr), &.bottom#{$s}:dir(rtl) {
$_url: '#{$assets}/text-select-start#{$as}#{$asset_suffix}';
-gtk-icon-source: -gtk-scaled(url('#{$_url}.png'),
url('#{$_url}@2.png'));
}
&.bottom#{$s}:dir(ltr), &.top#{$s}:dir(rtl) {
$_url: '#{$assets}/text-select-end#{$as}#{$asset_suffix}';
-gtk-icon-source: -gtk-scaled(url('#{$_url}.png'),
url('#{$_url}@2.png'));
}
&.insertion-cursor#{$s}:dir(ltr), &.insertion-cursor#{$s}:dir(rtl) {
$_url: '#{$assets}/slider-horz-scale-has-marks-above#{$as}#{$asset_suffix}';
-gtk-icon-source: -gtk-scaled(url('#{$_url}.png'),
url('#{$_url}@2.png'));
}
}
}
@import '../common/cursor-handle.scss';
shortcuts-section {
margin: 20px;