1
Fork 0
mirror of https://github.com/RGBCube/serenity synced 2025-07-25 06:47:35 +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:
Andreas Kling 2019-03-16 12:57:04 +01:00
parent 955a0ff477
commit eb610b309e
11 changed files with 22 additions and 13 deletions

View file

@ -24,12 +24,13 @@ public:
Function<void(int)> on_change;
virtual const char* class_name() const override { return "GScrollBar"; }
private:
virtual void paint_event(GPaintEvent&) override;
virtual void mousedown_event(GMouseEvent&) override;
virtual void mouseup_event(GMouseEvent&) override;
virtual void mousemove_event(GMouseEvent&) override;
virtual const char* class_name() const override { return "GScrollBar"; }
int button_size() const { return orientation() == Orientation::Vertical ? width() : height(); }
Rect up_button_rect() const;