gnome-shell-dark-theme/gnome-shell-sass/widgets/_keyboard.scss

159 lines
4.4 KiB
SCSS
Raw Normal View History

/* On-screen Keyboard */
$key_size: 1.2em;
2024-03-25 13:34:36 -04:00
$key_border_radius: $base_border_radius * 1.25;
$key_bg_color: darken($osd_fg_color, 70%);
// $default_key_bg_color: darken($key_bg_color, 4%);
$default_key_bg_color: if($variant=='light', darken($key_bg_color, 11%), darken($key_bg_color, 10%));
// draw keys using button function
#keyboard {
// background-color: transparentize(if($variant=='light', darken($bg_color, 5%), darken($bg_color, 8%)), 0.1);
background-color: $osd_bg_color;
box-shadow: inset 0 1px 0 0 $osd_outer_borders_color;
.page-indicator {
padding: $base_padding;
.page-indicator-icon {
width: 8px;
height: 8px;
}
}
}
// the container for individual keys
.key-container {
padding: $base_margin;
spacing: $base_margin;
}
// the keys
.keyboard-key {
2024-03-25 13:34:36 -04:00
@include fontsize($base_font_size + 5pt);
font-weight: bold;
min-height: $key_size;
min-width: $key_size;
border-width: 1px;
border-style: solid;
border-radius: $key_border_radius;
box-shadow: 0 1px 0 0 $shadow_color;
2024-03-25 13:34:36 -04:00
@include button(normal, $c:$key_bg_color, $tc:$osd_fg_color);
2024-03-25 13:34:36 -04:00
&:focus { @include button(focus);}
&:hover { @include button(hover, $c:$key_bg_color, $tc:$osd_fg_color);}
&:active { @include button(active, $c:$key_bg_color, $tc:$osd_fg_color); }
&:checked { @include button(checked, $c:$key_bg_color, $tc:$osd_fg_color); }
&:grayed { //FIXMEy
background-color: darken($bg_color, 3%);
color: $osd_fg_color;
border-color: $osd_borders_color;
}
// non-character keys
&.default-key {
2024-03-25 13:34:36 -04:00
@include button(normal, $c:$default_key_bg_color, $tc:$osd_fg_color);
&:hover { @include button(hover, $c:$default_key_bg_color, $tc:$osd_fg_color);}
&:active { @include button(active, $c:$default_key_bg_color, $tc:$osd_fg_color);}
&:checked { @include button(checked, $c:$default_key_bg_color, $tc:$osd_fg_color);}
border-radius: $key_border_radius;
// keys that may be latched: ctrl/alt/shift
&:latched {
2024-09-19 20:40:52 -04:00
border-color: st-lighten(-st-accent-color, 5%);
background-color: -st-accent-color;
}
}
// enter key is suggested-action
&.enter-key {
2024-09-19 20:40:52 -04:00
@include button(normal, $c:-st-accent-color, $tc:-st-accent-fg-color);
&:hover { @include button(hover, $c:-st-accent-color, $tc:-st-accent-fg-color);}
&:active { @include button(active, $c:-st-accent-color, $tc:-st-accent-fg-color);}
&:checked { @include button(checked, $c:-st-accent-color, $tc:-st-accent-fg-color);}
border-radius: $key_border_radius;
color: $osd_fg_color;
}
&.shift-key-lowercase {}
2024-03-25 13:34:36 -04:00
// pressed shift has different style
2024-03-25 13:34:36 -04:00
&.shift-key-uppercase {
background-color: lighten($key_bg_color, 20%);
color: $osd_bg_color;
&:hover {
background-color: lighten($key_bg_color, 25%);
color: lighten($osd_bg_color, 5%);
}
}
// size of icons on keys
2024-03-25 13:34:36 -04:00
StIcon { icon-size: $medium_icon_size; }
}
// long press on a key popup
.keyboard-subkeys {
2024-03-25 13:34:36 -04:00
-arrow-border-radius: $base_border_radius * 2;
-arrow-background-color: $osd_bg_color;
-arrow-border-width: 1px;
-arrow-border-color: lighten($osd_bg_color, 9%);
-arrow-base: 20px;
-arrow-rise: 10px;
-boxpointer-gap: $base_padding;
padding: $base_padding;
.keyboard-key {
2024-03-25 13:34:36 -04:00
@include button(normal, $c:$key_bg_color, $tc:$osd_fg_color);
2024-03-25 13:34:36 -04:00
&:focus { @include button(focus);}
&:hover { @include button(hover, $c:$key_bg_color, $tc:$osd_fg_color);}
&:active { @include button(active, $c:$key_bg_color, $tc:$osd_fg_color); }
&:checked { @include button(checked, $c:$key_bg_color, $tc:$osd_fg_color); }
border-radius:$key_border_radius;
}
}
// emoji
.emoji-page {
.keyboard-key {
background-color: transparent;
border: none;
color: initial;
}
}
.emoji-panel {
.keyboard-key:latched {
2024-09-19 20:40:52 -04:00
border-color: st-lighten(-st-accent-color, 5%);
background-color: -st-accent-color;
}
}
// suggestions
.word-suggestions {
2024-03-25 13:34:36 -04:00
@extend %title_4;
spacing: 12px;
min-height: 17pt;
2024-03-25 13:34:36 -04:00
padding: $base_padding * 2;
color: $osd_fg_color;
// each suggestion
StButton {
margin: 0 3px;
min-width: 32px;
2024-03-25 13:34:36 -04:00
border-radius: 4px;
padding: 0px $base_padding * 3;
2024-03-25 13:34:36 -04:00
@include button(undecorated, $c:$key_bg_color, $tc:$osd_fg_color);
2024-03-25 13:34:36 -04:00
&:focus { @include button(focus);}
&:hover { @include button(hover, $c:$key_bg_color, $tc:$osd_fg_color);}
&:active { @include button(active, $c:$key_bg_color, $tc:$osd_fg_color); }
&:checked { @include button(checked, $c:$key_bg_color, $tc:$osd_fg_color); }
}
}