fix: styles for keyboard navigaton
This commit is contained in:
1 parent
f07ad59d9f
commit
4fb43ff6b8
8 files changed
+63
-9
No files matched your search
@@ -48,9 +48,9 @@ The options listed here are not editable from within the user interface.
|
||||
# Start KlipperScreen with the screen locked
|
||||
# start_locked: False
|
||||
|
||||
# Allow the buttons to focus to navigate with the keyboard
|
||||
# Allow button focus to navigate with the keyboard
|
||||
# a scroll wheel mapped to tab/shift+tab and enter button can work
|
||||
# Beware that the UI is coded to be touchscreen controlled, this is secondary and
|
||||
# Beware that the UI is coded to be touchscreen controlled, this is
|
||||
# not recommended as the only way to control
|
||||
# keyboard_navigation: False
|
||||
```
|
||||
|
||||
@@ -167,7 +167,7 @@ class KlippyGtk:
|
||||
if self.font_size_type == "max" and label is not None:
|
||||
image_name = None
|
||||
b = Gtk.Button(hexpand=True, vexpand=True, image_position=position, always_show_image=True)
|
||||
focusable = self.screen._config.get_main_config().getboolean("allow_button_focus", fallback=False)
|
||||
focusable = self.screen._config.get_main_config().getboolean("keyboard_navigation", fallback=False)
|
||||
b.set_can_focus(focusable)
|
||||
if label is not None:
|
||||
b.set_label(label.replace("\n", " "))
|
||||
|
||||
@@ -75,7 +75,6 @@ button {
|
||||
|
||||
.active image,
|
||||
button:active,
|
||||
button:focus,
|
||||
.button_active,
|
||||
button.active {
|
||||
background-color: @active;
|
||||
|
||||
@@ -68,6 +68,19 @@ button.color4 {
|
||||
border-radius: 1em;
|
||||
}
|
||||
|
||||
button:focus,
|
||||
button.color1:focus,
|
||||
button.color2:focus,
|
||||
button.color3:focus,
|
||||
button.color4:focus,
|
||||
button.update:focus,
|
||||
button.invalid:focus,
|
||||
.dialog button:focus
|
||||
{
|
||||
outline: .1em dashed @solarized-orange;
|
||||
outline-offset: .1em;
|
||||
}
|
||||
|
||||
button.color1:active,
|
||||
button.color2:active,
|
||||
button.color3:active,
|
||||
@@ -280,4 +293,4 @@ textview .time {
|
||||
|
||||
.dialog-primary {
|
||||
border-bottom-color: @solarized-green;
|
||||
}
|
||||
}
|
||||
@@ -58,6 +58,20 @@ button.color4 {
|
||||
border-radius: 1em;
|
||||
}
|
||||
|
||||
|
||||
button:focus,
|
||||
button.color1:focus,
|
||||
button.color2:focus,
|
||||
button.color3:focus,
|
||||
button.color4:focus,
|
||||
button.update:focus,
|
||||
button.invalid:focus,
|
||||
.dialog button:focus
|
||||
{
|
||||
outline: .1em dashed @active;
|
||||
outline-offset: .1em;
|
||||
}
|
||||
|
||||
.active image,
|
||||
button.color1:active,
|
||||
button.color2:active,
|
||||
@@ -247,4 +261,4 @@ button.active {
|
||||
|
||||
.dialog-primary {
|
||||
border-bottom-color: @color1;
|
||||
}
|
||||
}
|
||||
@@ -55,6 +55,20 @@ button.color4 {
|
||||
padding-top: 0.4em;
|
||||
}
|
||||
|
||||
|
||||
button:focus,
|
||||
button.color1:focus,
|
||||
button.color2:focus,
|
||||
button.color3:focus,
|
||||
button.color4:focus,
|
||||
button.update:focus,
|
||||
button.invalid:focus,
|
||||
.dialog button:focus
|
||||
{
|
||||
background-color: #424242;
|
||||
border-color: #424242;
|
||||
}
|
||||
|
||||
button.color1:active,
|
||||
button.color2:active,
|
||||
button.color3:active,
|
||||
@@ -241,4 +255,4 @@ textview .time {
|
||||
|
||||
.keyboard_pad {
|
||||
background-color: #090909;
|
||||
}
|
||||
}
|
||||
@@ -80,6 +80,19 @@ button.color4 {
|
||||
border-radius: 1em;
|
||||
}
|
||||
|
||||
button:focus,
|
||||
button.color1:focus,
|
||||
button.color2:focus,
|
||||
button.color3:focus,
|
||||
button.color4:focus,
|
||||
button.update:focus,
|
||||
button.invalid:focus,
|
||||
.dialog button:focus
|
||||
{
|
||||
outline: .1em dashed @solarized-orange;
|
||||
outline-offset: .1em;
|
||||
}
|
||||
|
||||
button.color1:active,
|
||||
button.color2:active,
|
||||
button.color3:active,
|
||||
@@ -314,4 +327,4 @@ textview .time {
|
||||
.dialog-primary {
|
||||
background-color: @color1;
|
||||
border-bottom-color: @color1;
|
||||
}
|
||||
}
|
||||
@@ -29,6 +29,7 @@ button {
|
||||
background-color: @bg;
|
||||
}
|
||||
|
||||
button:focus,
|
||||
button:active {
|
||||
background-color: @active;
|
||||
}
|
||||
@@ -216,4 +217,4 @@ textview .time {
|
||||
|
||||
.dialog-primary {
|
||||
border-bottom-color: @color1;
|
||||
}
|
||||
}
|
||||
Reference in new issue
Block a user