This commit is contained in:
vinceliuice
2024-05-12 18:11:41 +08:00
parent fff397c3ce
commit bbbda97b78
4 changed files with 16 additions and 13 deletions

View File

@@ -3250,7 +3250,7 @@ scale {
border-radius: $circular-radius;
color: $primary;
background-color: $base;
box-shadow: inset 0 0 0 2px $primary;
box-shadow: inset 0 0 0 2px $primary, 0 0 0 8px transparent;
&:hover {
box-shadow: inset 0 0 0 2px $primary, 0 0 0 8px $divider;

View File

@@ -106,8 +106,8 @@ $trough_active_color: gtkalpha(currentColor, .25);
$fill_color: $accent_bg_color;
$fill_text_color: $accent_fg_color;
$slider_color: gtkmix(white, $view_bg_color, 80%);
$slider_hover_color: white;
$slider_color: $headerbar_bg_color;
$slider_hover_color: $headerbar_backdrop_color;
$osd_fg_color: transparentize(white, .1);
$osd_text_color: white;

View File

@@ -36,14 +36,14 @@ scale {
> slider {
background-color: $slider_color;
box-shadow: 0 0 0 1px $_slider_border_color, 0 2px 4px transparentize(black, .8);
box-shadow: 0 0 0 2px $fill_color, 0 0 0 0 transparent;
border-radius: 100%;
transition: $transition-shadow;
// the slider is inside the trough, so to have make it bigger there's a negative margin
min-width: 20px;
min-height: 20px;
margin: -8px;
min-width: 16px;
min-height: 16px;
margin: -7px;
}
}
@@ -57,6 +57,7 @@ scale {
> slider {
background-color: $slider_hover_color;
box-shadow: 0 0 0 2px $fill_color, 0 0 0 8px gtkalpha($text_color, 0.12);
}
}
}
@@ -76,7 +77,7 @@ scale {
filter: opacity($disabled_opacity);
> trough > slider {
box-shadow: 0 0 0 1px $_slider_border_color, 0 2px 4px transparent;
box-shadow: 0 0 0 2px gtkmix($fill_color, $window_bg_color, 50%);
outline-color: transparentize(black, .8);
}
}
@@ -111,10 +112,10 @@ scale {
// Adjust box-shadow for the 45deg rotation, for 0px 2px we ideally want
// 1/√2px 1/√2px, round that to 1px 1px
box-shadow: 0 0 0 1px $_slider_border_color, 1px 1px 4px transparentize(black, .8);
box-shadow: 0 0 0 2px $fill_color;
&:disabled {
box-shadow: 0 0 0 1px $_slider_border_color, 1px 1px 4px transparent;
box-shadow: 0 0 0 2px gtkmix($fill_color, $window_bg_color, 50%);
}
}
}

View File

@@ -1,4 +1,6 @@
switch {
$switch_slider_color: white;
// similar to GtkScale
border-radius: $circular_radius;
padding: $base_padding / 2;
@@ -18,7 +20,7 @@ switch {
min-width: $small_size - 6px;
min-height: $small_size - 6px;
border-radius: 50%;
background-color: $slider_color;
background-color: $switch_slider_color;
box-shadow: 0 2px 3px rgba(black, 0.15), 0 0 0 0 transparent;
transition: box-shadow 100ms $ease_out,
background-color $duration $ease_out;
@@ -38,7 +40,7 @@ switch {
> slider {
color: $window_fg_color;
background-color: $slider_hover_color;
background-color: $switch_slider_color;
}
}