1
Fork 0
mirror of https://github.com/RGBCube/serenity synced 2025-07-25 04:37:34 +00:00

LibGUI: Make button icons settable in GML

`Widget::load_from_gml()` doesn't yet return `ErrorOr`, so we log a
warning message if loading the icon fails.
This commit is contained in:
Sam Atkins 2022-01-06 16:59:58 +00:00 committed by Andreas Kling
parent 49011e2030
commit dd17df76e9
2 changed files with 13 additions and 0 deletions

View file

@ -21,6 +21,7 @@ public:
virtual ~Button() override;
void set_icon(RefPtr<Gfx::Bitmap>&&);
void set_icon_from_path(String const&);
const Gfx::Bitmap* icon() const { return m_icon.ptr(); }
Gfx::Bitmap* icon() { return m_icon.ptr(); }