feat: allow keyboard navigation (disabled by default)
superseed and close #1626
This commit is contained in:
1 parent
fbaa1e1fd8
commit
ab4a48e5c5
4 files changed
+13
-3
No files matched your search
@@ -166,7 +166,9 @@ class KlippyGtk:
|
||||
def Button(self, image_name=None, label=None, style=None, scale=None, position=Gtk.PositionType.TOP, lines=2):
|
||||
if self.font_size_type == "max" and label is not None:
|
||||
image_name = None
|
||||
b = Gtk.Button(hexpand=True, vexpand=True, can_focus=False, image_position=position, always_show_image=True)
|
||||
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)
|
||||
b.set_can_focus(focusable)
|
||||
if label is not None:
|
||||
b.set_label(label.replace("\n", " "))
|
||||
if image_name is not None:
|
||||
|
||||
@@ -162,7 +162,8 @@ class KlipperScreenConfig:
|
||||
bools = (
|
||||
'invert_x', 'invert_y', 'invert_z', '24htime', 'only_heaters', 'show_cursor', 'confirm_estop',
|
||||
'autoclose_popups', 'use_dpms', 'use_default_menu', 'side_macro_shortcut', 'use-matchbox-keyboard',
|
||||
'show_heater_power', "show_scroll_steppers", "auto_open_extrude", "start_locked"
|
||||
'show_heater_power', "show_scroll_steppers", "auto_open_extrude", "start_locked",
|
||||
"keyboard_navigation"
|
||||
)
|
||||
strs = (
|
||||
'default_printer', 'language', 'print_sort_dir', 'theme', 'screen_blanking_printing', 'font_size',
|
||||
|
||||
Reference in new issue
Block a user