summaryrefslogtreecommitdiff
path: root/Userland/Applications/BrowserSettings
diff options
context:
space:
mode:
authorSam Atkins <atkinssj@serenityos.org>2021-11-25 16:20:33 +0000
committerAndreas Kling <kling@serenityos.org>2021-11-26 22:14:56 +0100
commita1e1405f2636c7251331644bb4ab8cce0a29c61c (patch)
tree1d4202962ac35f307ae77212e3d785aba5bdf9c2 /Userland/Applications/BrowserSettings
parentc22b0bb8b2305bcbb1a4ec4eab02c67358e4f8ea (diff)
downloadserenity-a1e1405f2636c7251331644bb4ab8cce0a29c61c.zip
BrowserSettings: Add some icons for it :^)
Diffstat (limited to 'Userland/Applications/BrowserSettings')
-rw-r--r--Userland/Applications/BrowserSettings/BrowserSettingsWidget.cpp13
1 files changed, 13 insertions, 0 deletions
diff --git a/Userland/Applications/BrowserSettings/BrowserSettingsWidget.cpp b/Userland/Applications/BrowserSettings/BrowserSettingsWidget.cpp
index 8339473ac2..e0b22c0838 100644
--- a/Userland/Applications/BrowserSettings/BrowserSettingsWidget.cpp
+++ b/Userland/Applications/BrowserSettings/BrowserSettingsWidget.cpp
@@ -8,6 +8,7 @@
#include <Applications/BrowserSettings/BrowserSettingsWidgetGML.h>
#include <LibConfig/Client.h>
#include <LibGUI/JsonArrayModel.h>
+#include <LibGUI/Label.h>
#include <LibGUI/Model.h>
static String default_homepage_url = "file:///res/html/misc/welcome.html";
@@ -58,9 +59,15 @@ 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()));
@@ -70,6 +77,9 @@ 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");
@@ -100,6 +110,9 @@ 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);
}