mirror of
https://github.com/RGBCube/serenity
synced 2025-05-31 09:58:11 +00:00
LibGUI: Make class_name() public so you can always call it.
I found myself having to cast to GWidget* all the time when writing some generic debugging code that just wanted to dump widget info.
This commit is contained in:
parent
955a0ff477
commit
eb610b309e
11 changed files with 22 additions and 13 deletions
|
@ -23,6 +23,8 @@ public:
|
|||
void set_button_style(GButtonStyle style) { m_button_style = style; }
|
||||
GButtonStyle button_style() const { return m_button_style; }
|
||||
|
||||
virtual const char* class_name() const override { return "GButton"; }
|
||||
|
||||
private:
|
||||
virtual void paint_event(GPaintEvent&) override;
|
||||
virtual void mousedown_event(GMouseEvent&) override;
|
||||
|
@ -31,8 +33,6 @@ private:
|
|||
virtual void enter_event(GEvent&) override;
|
||||
virtual void leave_event(GEvent&) override;
|
||||
|
||||
virtual const char* class_name() const override { return "GButton"; }
|
||||
|
||||
String m_caption;
|
||||
RetainPtr<GraphicsBitmap> m_icon;
|
||||
GButtonStyle m_button_style { GButtonStyle::Normal };
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue