2019-12-18 16:25:03 -05:00
|
|
|
/* On-screen Keyboard */
|
|
|
|
|
|
|
|
$key_size: 1.2em;
|
2021-12-28 08:46:54 -05:00
|
|
|
$key_border_radius: $base_border_radius + 4px; // 12px
|
|
|
|
$key_bg_color: darken($osd_fg_color, 70%);
|
2019-12-18 16:25:03 -05:00
|
|
|
// $default_key_bg_color: darken($key_bg_color, 4%);
|
2021-12-28 08:46:54 -05:00
|
|
|
$default_key_bg_color: if($variant=='light', darken($key_bg_color, 11%), darken($key_bg_color, 10%));
|
2019-12-18 16:25:03 -05:00
|
|
|
|
|
|
|
|
|
|
|
// draw keys using button function
|
|
|
|
#keyboard {
|
2021-12-28 08:46:54 -05:00
|
|
|
// background-color: transparentize(if($variant=='light', darken($bg_color, 5%), darken($bg_color, 8%)), 0.1);
|
|
|
|
background-color: $osd_bg_color;
|
2020-01-24 21:37:16 -05:00
|
|
|
box-shadow: inset 0 1px 0 0 $osd_outer_borders_color;
|
2019-12-19 10:38:27 -05:00
|
|
|
|
|
|
|
.page-indicator {
|
|
|
|
padding: $base_padding;
|
|
|
|
|
|
|
|
.page-indicator-icon {
|
2019-12-19 15:56:45 -05:00
|
|
|
width: 8px;
|
|
|
|
height: 8px;
|
2019-12-19 10:38:27 -05:00
|
|
|
}
|
|
|
|
}
|
2019-12-18 16:25:03 -05:00
|
|
|
}
|
|
|
|
|
|
|
|
// the container for individual keys
|
|
|
|
.key-container {
|
2019-12-19 10:38:27 -05:00
|
|
|
padding: $base_margin;
|
|
|
|
spacing: $base_margin;
|
2019-12-18 16:25:03 -05:00
|
|
|
}
|
|
|
|
|
|
|
|
// the keys
|
|
|
|
.keyboard-key {
|
2019-12-19 10:38:27 -05:00
|
|
|
|
2019-12-19 11:09:33 -05:00
|
|
|
@include fontsize($base_font_size + 5);
|
2021-12-28 08:46:54 -05:00
|
|
|
font-weight: bold;
|
2019-12-19 10:38:27 -05:00
|
|
|
min-height: $key_size;
|
|
|
|
min-width: $key_size;
|
2020-01-14 13:09:03 -05:00
|
|
|
border-width: 1px;
|
|
|
|
border-style: solid;
|
2019-12-19 10:38:27 -05:00
|
|
|
border-radius: $key_border_radius;
|
2022-02-02 13:17:42 -05:00
|
|
|
box-shadow: 0 1px 0 0 $shadow_color;
|
|
|
|
|
|
|
|
@include keyboard_key(normal, $key_bg_color, $osd_fg_color);
|
|
|
|
|
|
|
|
&:focus { @include keyboard_key(focus);}
|
|
|
|
&:hover, &:checked { @include keyboard_key(hover, $key_bg_color, $osd_fg_color);}
|
|
|
|
&:active { @include keyboard_key(active, $key_bg_color, $osd_fg_color); }
|
2019-12-19 10:38:27 -05:00
|
|
|
|
|
|
|
&:grayed { //FIXMEy
|
|
|
|
background-color: darken($bg_color, 3%);
|
|
|
|
color: $osd_fg_color;
|
|
|
|
border-color: $osd_borders_color;
|
|
|
|
}
|
|
|
|
|
|
|
|
// non-character keys
|
|
|
|
&.default-key {
|
2022-02-02 13:17:42 -05:00
|
|
|
@include keyboard_key(normal, $default_key_bg_color, $osd_fg_color);
|
|
|
|
&:hover, &:checked {@include keyboard_key(hover, $default_key_bg_color, $osd_fg_color);}
|
|
|
|
&:active { @include keyboard_key(active, $default_key_bg_color, $osd_fg_color);}
|
2021-12-28 08:46:54 -05:00
|
|
|
border-radius: $key_border_radius;
|
2019-12-19 10:38:27 -05:00
|
|
|
}
|
|
|
|
|
|
|
|
// enter key is suggested-action
|
|
|
|
&.enter-key {
|
2022-02-02 13:17:42 -05:00
|
|
|
@include keyboard_key(normal, $selected_bg_color, $selected_fg_color);
|
|
|
|
&:hover, &:checked { @include keyboard_key(hover, lighten($selected_bg_color, 3%), $selected_fg_color);}
|
|
|
|
&:active {@include keyboard_key(active, darken($selected_bg_color, 2%), $selected_fg_color);}
|
2021-12-28 08:46:54 -05:00
|
|
|
border-radius: $key_border_radius;
|
|
|
|
color: $osd_fg_color;
|
2019-12-19 10:38:27 -05:00
|
|
|
}
|
|
|
|
|
2021-12-28 08:46:54 -05:00
|
|
|
&.shift-key-lowercase {}
|
|
|
|
|
|
|
|
// pressed shift has different style
|
|
|
|
&.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%);
|
|
|
|
}
|
|
|
|
}
|
2020-02-15 09:49:43 -05:00
|
|
|
|
2021-12-28 08:46:54 -05:00
|
|
|
// size of icons on keys
|
|
|
|
StIcon { icon-size: 24px; }
|
2019-12-18 16:25:03 -05:00
|
|
|
}
|
|
|
|
|
|
|
|
// long press on a key popup
|
|
|
|
.keyboard-subkeys {
|
2021-12-28 08:46:54 -05:00
|
|
|
-arrow-border-radius: $base_border_radius*2;
|
2019-12-19 10:38:27 -05:00
|
|
|
-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_spacing;
|
2021-12-28 08:46:54 -05:00
|
|
|
padding: $base_padding;
|
2019-12-19 10:38:27 -05:00
|
|
|
|
|
|
|
.keyboard-key {
|
2022-02-02 13:17:42 -05:00
|
|
|
@include keyboard_key(normal, $key_bg_color, $osd_fg_color);
|
2019-12-19 10:38:27 -05:00
|
|
|
|
2022-02-02 13:17:42 -05:00
|
|
|
&:focus { @include keyboard_key(focus);}
|
|
|
|
&:hover, &:checked { @include keyboard_key(hover, $key_bg_color, $osd_fg_color);}
|
|
|
|
&:active { @include keyboard_key(active, $key_bg_color, $osd_fg_color); }
|
2019-12-19 10:38:27 -05:00
|
|
|
|
2021-12-28 08:46:54 -05:00
|
|
|
border-radius:$key_border_radius;
|
2019-12-19 10:38:27 -05:00
|
|
|
}
|
2019-12-18 16:25:03 -05:00
|
|
|
}
|
|
|
|
|
|
|
|
// emoji
|
|
|
|
.emoji-page {
|
2019-12-19 10:38:27 -05:00
|
|
|
.keyboard-key {
|
|
|
|
background-color: transparent;
|
|
|
|
border: none;
|
|
|
|
color: initial;
|
|
|
|
}
|
2019-12-18 16:25:03 -05:00
|
|
|
}
|
|
|
|
|
|
|
|
.emoji-panel {
|
2019-12-19 10:38:27 -05:00
|
|
|
.keyboard-key:latched {
|
|
|
|
border-color: lighten($selected_bg_color, 5%);
|
|
|
|
background-color: $selected_bg_color;
|
|
|
|
}
|
2019-12-18 16:25:03 -05:00
|
|
|
}
|
|
|
|
|
|
|
|
// suggestions
|
|
|
|
.word-suggestions {
|
2019-12-19 11:09:33 -05:00
|
|
|
@include fontsize($base_font_size + 3);
|
2019-12-19 10:38:27 -05:00
|
|
|
spacing: 12px;
|
|
|
|
min-height: 20pt;
|
2021-12-28 08:46:54 -05:00
|
|
|
padding: $base_padding*2;
|
|
|
|
color: $osd_fg_color;
|
|
|
|
|
|
|
|
// each suggestion
|
|
|
|
StButton {
|
|
|
|
margin: 0 3px;
|
|
|
|
min-width: 32px;
|
|
|
|
border-radius: $base_border_radius - 2px;
|
|
|
|
padding: $base_padding $base_padding*3;
|
|
|
|
|
2022-02-02 13:17:42 -05:00
|
|
|
@include keyboard_key(undecorated, $key_bg_color, $osd_fg_color);
|
2021-12-28 08:46:54 -05:00
|
|
|
|
2022-02-02 13:17:42 -05:00
|
|
|
&:focus { @include keyboard_key(focus);}
|
|
|
|
&:hover, &:checked { @include keyboard_key(hover, $key_bg_color, $osd_fg_color);}
|
|
|
|
&:active { @include keyboard_key(active, $key_bg_color, $osd_fg_color); }
|
2021-12-28 08:46:54 -05:00
|
|
|
}
|
2020-01-24 21:37:16 -05:00
|
|
|
}
|