mirror of
https://github.com/RGBCube/serenity
synced 2025-07-26 10:47:35 +00:00
LibGUI: Add a setting to make GLabel stretch its icon.
Use this in QuickShow to allow arbitrarily scaling the opened image.
This commit is contained in:
parent
86570d3b1a
commit
d563dc0565
3 changed files with 38 additions and 4 deletions
|
@ -22,6 +22,9 @@ public:
|
|||
TextAlignment text_alignment() const { return m_text_alignment; }
|
||||
void set_text_alignment(TextAlignment text_alignment) { m_text_alignment = text_alignment; }
|
||||
|
||||
bool should_stretch_icon() const { return m_should_stretch_icon; }
|
||||
void set_should_stretch_icon(bool b) { m_should_stretch_icon = b; }
|
||||
|
||||
void size_to_fit();
|
||||
|
||||
virtual const char* class_name() const override { return "GLabel"; }
|
||||
|
@ -32,5 +35,6 @@ private:
|
|||
String m_text;
|
||||
RetainPtr<GraphicsBitmap> m_icon;
|
||||
TextAlignment m_text_alignment { TextAlignment::Center };
|
||||
bool m_should_stretch_icon { false };
|
||||
};
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue