mirror of
https://github.com/fergalmoran/ladybird.git
synced 2026-01-04 07:36:50 +00:00
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.
This commit is contained in:
committed by
Andreas Kling
parent
59483b0654
commit
4c9933bfb7
@@ -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());
|
||||
|
||||
Reference in New Issue
Block a user