diff options
author | thankyouverycool <66646555+thankyouverycool@users.noreply.github.com> | 2023-04-29 10:42:04 -0400 |
---|---|---|
committer | Andreas Kling <kling@serenityos.org> | 2023-04-30 05:48:14 +0200 |
commit | 4c9933bfb701c43a2f9aeadf8d06398fd6327749 (patch) | |
tree | 9e9342d9ab6133a10e42fb81765f5abf9e508d75 /Userland/Libraries/LibGUI/PasswordInputDialog.cpp | |
parent | 59483b06546f57a3262aafbe3ed3015185b6bf70 (diff) | |
download | serenity-4c9933bfb701c43a2f9aeadf8d06398fd6327749.zip |
LibGUI: Remove Label icons and replace instances with ImageWidget
These icons are a relic of GLabel and were never implemented to
accomodate both image and text. This convenience can always be added
in the future, but no current instance assumes or needs it, so let's
replace them all with ImageWidget to show clearer intent.
Diffstat (limited to 'Userland/Libraries/LibGUI/PasswordInputDialog.cpp')
-rw-r--r-- | Userland/Libraries/LibGUI/PasswordInputDialog.cpp | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/Userland/Libraries/LibGUI/PasswordInputDialog.cpp b/Userland/Libraries/LibGUI/PasswordInputDialog.cpp index ee046d9546..106aa39d97 100644 --- a/Userland/Libraries/LibGUI/PasswordInputDialog.cpp +++ b/Userland/Libraries/LibGUI/PasswordInputDialog.cpp @@ -6,6 +6,7 @@ */ #include <LibGUI/Button.h> +#include <LibGUI/ImageWidget.h> #include <LibGUI/Label.h> #include <LibGUI/PasswordInputDialog.h> #include <LibGUI/PasswordInputDialogGML.h> @@ -25,9 +26,9 @@ PasswordInputDialog::PasswordInputDialog(Window* parent_window, DeprecatedString auto widget = set_main_widget<Widget>().release_value_but_fixme_should_propagate_errors(); widget->load_from_gml(password_input_dialog_gml).release_value_but_fixme_should_propagate_errors(); - auto& key_icon_label = *widget->find_descendant_of_type_named<GUI::Label>("key_icon_label"); + auto& key_icon = *widget->find_descendant_of_type_named<GUI::ImageWidget>("key_icon"); - key_icon_label.set_icon(Gfx::Bitmap::load_from_file("/res/icons/32x32/key.png"sv).release_value_but_fixme_should_propagate_errors()); + key_icon.set_bitmap(Gfx::Bitmap::load_from_file("/res/icons/32x32/key.png"sv).release_value_but_fixme_should_propagate_errors()); auto& server_label = *widget->find_descendant_of_type_named<GUI::Label>("server_label"); server_label.set_text(String::from_deprecated_string(server).release_value_but_fixme_should_propagate_errors()); |