switch: Add hover styles
Same as checkboxes. Closes https://gitlab.gnome.org/GNOME/gnome-shell/-/issues/6455 Part-of: <https://gitlab.gnome.org/GNOME/gnome-shell/-/merge_requests/2717>
This commit is contained in:
parent
259eaa9bbb
commit
cca34af31e
@ -11,8 +11,16 @@ $switch_handle_size: 20px;
|
||||
|
||||
@if $contrast == 'high' {
|
||||
background: transparentize(if($variant == 'light', black, white), .7);
|
||||
|
||||
&:hover {
|
||||
background: transparentize(if($variant == 'light', black, white), .6);
|
||||
}
|
||||
} @else {
|
||||
background: transparentize(if($variant == 'light', black, white), .85);
|
||||
|
||||
&:hover {
|
||||
background: transparentize(if($variant == 'light', black, white), .8);
|
||||
}
|
||||
}
|
||||
|
||||
StIcon {
|
||||
@ -33,6 +41,11 @@ $switch_handle_size: 20px;
|
||||
background: $selected_bg_color;
|
||||
color: $selected_fg_color;
|
||||
|
||||
&:hover {
|
||||
background-color: lighten($selected_bg_color, 5%);
|
||||
color: lighten($selected_fg_color, 5%);
|
||||
}
|
||||
|
||||
.handle {
|
||||
background: white;
|
||||
}
|
||||
|
@ -343,6 +343,7 @@ export const Switch = GObject.registerClass({
|
||||
super._init({
|
||||
style_class: 'toggle-switch',
|
||||
accessible_role: Atk.Role.CHECK_BOX,
|
||||
track_hover: true,
|
||||
});
|
||||
|
||||
const box = new St.BoxLayout({
|
||||
|
Loading…
x
Reference in New Issue
Block a user