mirror of
https://github.com/LadybirdBrowser/ladybird
synced 2026-05-01 03:57:15 +02:00
KeyboardSettings: Also activate keymap via ListView's on_activation
This commit is contained in:
committed by
Linus Groh
parent
0317882b61
commit
6ed2ded77c
Notes:
sideshowbarker
2024-07-18 04:38:32 +09:00
Author: https://github.com/romch007 🔰 Commit: https://github.com/SerenityOS/serenity/commit/6ed2ded77c Pull-request: https://github.com/SerenityOS/serenity/pull/13733
@@ -181,7 +181,8 @@ KeyboardSettingsWidget::KeyboardSettingsWidget()
|
||||
keymaps_list_model.set_active_keymap(m_initial_active_keymap);
|
||||
|
||||
m_activate_keymap_button = find_descendant_of_type_named<GUI::Button>("activate_keymap_button");
|
||||
m_activate_keymap_button->on_click = [&](auto) {
|
||||
|
||||
m_activate_keymap_event = [&]() {
|
||||
auto& selection = m_selected_keymaps_listview->selection();
|
||||
if (!selection.is_empty()) {
|
||||
auto& selected_keymap = keymaps_list_model.keymap_at(selection.first().row());
|
||||
@@ -189,6 +190,14 @@ KeyboardSettingsWidget::KeyboardSettingsWidget()
|
||||
}
|
||||
};
|
||||
|
||||
m_activate_keymap_button->on_click = [&](auto) {
|
||||
m_activate_keymap_event();
|
||||
};
|
||||
|
||||
m_selected_keymaps_listview->on_activation = [&](auto) {
|
||||
m_activate_keymap_event();
|
||||
};
|
||||
|
||||
m_add_keymap_button = find_descendant_of_type_named<GUI::Button>("add_keymap_button");
|
||||
|
||||
m_add_keymap_button->on_click = [&](auto) {
|
||||
|
||||
Reference in New Issue
Block a user