diff options
author | Dylan Katz <dykatz@uw.edu> | 2022-01-28 23:11:38 -0800 |
---|---|---|
committer | Andreas Kling <kling@serenityos.org> | 2022-01-29 13:45:34 +0100 |
commit | 90b371ef4784d8b521bcb17c04a0946b11859e38 (patch) | |
tree | 7550ca70b1b54edcaa31c39d1c65cc1e7d703266 /Userland/Applications | |
parent | ca912a87f114b829a89fa324aa8cc22c8a9e9542 (diff) | |
download | serenity-90b371ef4784d8b521bcb17c04a0946b11859e38.zip |
KeyboardSettings: Set icons from GML
Diffstat (limited to 'Userland/Applications')
-rw-r--r-- | Userland/Applications/KeyboardSettings/Keyboard.gml | 5 | ||||
-rw-r--r-- | Userland/Applications/KeyboardSettings/KeyboardSettingsWidget.cpp | 5 |
2 files changed, 3 insertions, 7 deletions
diff --git a/Userland/Applications/KeyboardSettings/Keyboard.gml b/Userland/Applications/KeyboardSettings/Keyboard.gml index 5852366740..ad1f7d65a7 100644 --- a/Userland/Applications/KeyboardSettings/Keyboard.gml +++ b/Userland/Applications/KeyboardSettings/Keyboard.gml @@ -23,7 +23,7 @@ @GUI::Label { fixed_width: 32 fixed_height: 32 - name: "character_map_image_label" + icon: "/res/icons/32x32/app-keyboard-mapper.png" } @GUI::Widget @@ -59,6 +59,7 @@ text: "Test your current keymap below" text_alignment: "CenterLeft" } + @GUI::Button { text: "Clear" name: "button_clear_test_typing_area" @@ -85,7 +86,7 @@ @GUI::Label { fixed_width: 32 fixed_height: 32 - name: "num_lock_image_label" + icon: "/res/icons/32x32/app-calculator.png" } @GUI::CheckBox { diff --git a/Userland/Applications/KeyboardSettings/KeyboardSettingsWidget.cpp b/Userland/Applications/KeyboardSettings/KeyboardSettingsWidget.cpp index e2626ae64f..bc19174744 100644 --- a/Userland/Applications/KeyboardSettings/KeyboardSettingsWidget.cpp +++ b/Userland/Applications/KeyboardSettings/KeyboardSettingsWidget.cpp @@ -52,9 +52,6 @@ KeyboardSettingsWidget::KeyboardSettingsWidget() } VERIFY(initial_keymap_index < m_character_map_files.size()); - auto& character_map_image_label = *find_descendant_of_type_named<GUI::Label>("character_map_image_label"); - character_map_image_label.set_icon(Gfx::Bitmap::try_load_from_file("/res/icons/32x32/app-keyboard-mapper.png").release_value_but_fixme_should_propagate_errors()); - m_character_map_file_combo = find_descendant_of_type_named<GUI::ComboBox>("character_map_file_combo"); m_character_map_file_combo->set_only_allow_values_from_model(true); m_character_map_file_combo->set_model(*GUI::ItemListModel<String>::create(m_character_map_files)); @@ -73,8 +70,6 @@ KeyboardSettingsWidget::KeyboardSettingsWidget() m_test_typing_area->set_focus(true); }; - auto& num_lock_image_label = *find_descendant_of_type_named<GUI::Label>("num_lock_image_label"); - num_lock_image_label.set_icon(Gfx::Bitmap::try_load_from_file("/res/icons/32x32/app-calculator.png").release_value_but_fixme_should_propagate_errors()); m_num_lock_checkbox = find_descendant_of_type_named<GUI::CheckBox>("num_lock_checkbox"); m_num_lock_checkbox->set_checked(Config::read_bool("KeyboardSettings", "StartupEnable", "NumLock", true)); } |