From ca912a87f114b829a89fa324aa8cc22c8a9e9542 Mon Sep 17 00:00:00 2001 From: Dylan Katz Date: Fri, 28 Jan 2022 23:03:57 -0800 Subject: BrowserSettings: Set icons from GML --- .../Applications/BrowserSettings/BrowserSettingsWidget.cpp | 12 ------------ .../Applications/BrowserSettings/BrowserSettingsWidget.gml | 8 ++++---- 2 files changed, 4 insertions(+), 16 deletions(-) (limited to 'Userland') 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("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("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("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("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("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("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("enable_search_engine_checkbox"); m_search_engine_combobox_group = find_descendant_of_type_named("search_engine_combobox_group"); m_search_engine_combobox = find_descendant_of_type_named("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("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("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 { -- cgit v1.2.3