summaryrefslogtreecommitdiff
path: root/Userland
diff options
context:
space:
mode:
authorDylan Katz <dykatz@uw.edu>2022-01-28 23:03:57 -0800
committerAndreas Kling <kling@serenityos.org>2022-01-29 13:45:34 +0100
commitca912a87f114b829a89fa324aa8cc22c8a9e9542 (patch)
tree2b80d187fecfa06dc29c8a9c705dd1728c45357c /Userland
parent1c18261f8b252ba845d16de2e0b5ce6e46827e0f (diff)
downloadserenity-ca912a87f114b829a89fa324aa8cc22c8a9e9542.zip
BrowserSettings: Set icons from GML
Diffstat (limited to 'Userland')
-rw-r--r--Userland/Applications/BrowserSettings/BrowserSettingsWidget.cpp12
-rw-r--r--Userland/Applications/BrowserSettings/BrowserSettingsWidget.gml8
2 files changed, 4 insertions, 16 deletions
diff --git a/Userland/Applications/BrowserSettings/BrowserSettingsWidget.cpp b/Userland/Applications/BrowserSettings/BrowserSettingsWidget.cpp
index e0b22c0838..7ca9d6a4c7 100644
--- a/Userland/Applications/BrowserSettings/BrowserSettingsWidget.cpp
+++ b/Userland/Applications/BrowserSettings/BrowserSettingsWidget.cpp
@@ -59,15 +59,9 @@ BrowserSettingsWidget::BrowserSettingsWidget()
{
load_from_gml(browser_settings_widget_gml);
- auto& homepage_image_label = *find_descendant_of_type_named<GUI::Label>("homepage_image_label");
- homepage_image_label.set_icon(Gfx::Bitmap::try_load_from_file("/res/icons/32x32/home.png").release_value_but_fixme_should_propagate_errors());
-
m_homepage_url_textbox = find_descendant_of_type_named<GUI::TextBox>("homepage_url_textbox");
m_homepage_url_textbox->set_text(Config::read_string("Browser", "Preferences", "Home", default_homepage_url));
- auto& appearance_image_label = *find_descendant_of_type_named<GUI::Label>("appearance_image_label");
- appearance_image_label.set_icon(Gfx::Bitmap::try_load_from_file("/res/icons/32x32/color-chooser.png").release_value_but_fixme_should_propagate_errors());
-
m_color_scheme_combobox = find_descendant_of_type_named<GUI::ComboBox>("color_scheme_combobox");
m_color_scheme_combobox->set_only_allow_values_from_model(true);
m_color_scheme_combobox->set_model(adopt_ref(*new ColorSchemeModel()));
@@ -77,9 +71,6 @@ BrowserSettingsWidget::BrowserSettingsWidget()
m_show_bookmarks_bar_checkbox = find_descendant_of_type_named<GUI::CheckBox>("show_bookmarks_bar_checkbox");
m_show_bookmarks_bar_checkbox->set_checked(Config::read_bool("Browser", "Preferences", "ShowBookmarksBar", default_show_bookmarks_bar), GUI::AllowCallback::No);
- auto& search_engine_image_label = *find_descendant_of_type_named<GUI::Label>("search_engine_image_label");
- search_engine_image_label.set_icon(Gfx::Bitmap::try_load_from_file("/res/icons/32x32/search-engine.png").release_value_but_fixme_should_propagate_errors());
-
m_enable_search_engine_checkbox = find_descendant_of_type_named<GUI::CheckBox>("enable_search_engine_checkbox");
m_search_engine_combobox_group = find_descendant_of_type_named<GUI::Widget>("search_engine_combobox_group");
m_search_engine_combobox = find_descendant_of_type_named<GUI::ComboBox>("search_engine_combobox");
@@ -110,9 +101,6 @@ BrowserSettingsWidget::BrowserSettingsWidget()
};
set_search_engine_url(Config::read_string("Browser", "Preferences", "SearchEngine", default_search_engine));
- auto& download_image_label = *find_descendant_of_type_named<GUI::Label>("download_image_label");
- download_image_label.set_icon(Gfx::Bitmap::try_load_from_file("/res/icons/32x32/downloads.png").release_value_but_fixme_should_propagate_errors());
-
m_auto_close_download_windows_checkbox = find_descendant_of_type_named<GUI::CheckBox>("auto_close_download_windows_checkbox");
m_auto_close_download_windows_checkbox->set_checked(Config::read_bool("Browser", "Preferences", "CloseDownloadWidgetOnFinish", default_auto_close_download_windows), GUI::AllowCallback::No);
}
diff --git a/Userland/Applications/BrowserSettings/BrowserSettingsWidget.gml b/Userland/Applications/BrowserSettings/BrowserSettingsWidget.gml
index c631421ad7..520dba6a8c 100644
--- a/Userland/Applications/BrowserSettings/BrowserSettingsWidget.gml
+++ b/Userland/Applications/BrowserSettings/BrowserSettingsWidget.gml
@@ -23,7 +23,7 @@
@GUI::Label {
fixed_width: 32
fixed_height: 32
- name: "homepage_image_label"
+ icon: "/res/icons/32x32/home.png"
}
@GUI::Label {
@@ -56,7 +56,7 @@
@GUI::Label {
fixed_width: 32
fixed_height: 32
- name: "appearance_image_label"
+ icon: "/res/icons/32x32/color-chooser.png"
}
@GUI::Label {
@@ -103,7 +103,7 @@
@GUI::Label {
fixed_width: 32
fixed_height: 32
- name: "search_engine_image_label"
+ icon: "/res/icons/32x32/search-engine.png"
}
@GUI::CheckBox {
@@ -175,7 +175,7 @@
@GUI::Label {
fixed_width: 32
fixed_height: 32
- name: "download_image_label"
+ icon: "/res/icons/32x32/downloads.png"
}
@GUI::CheckBox {