1
Fork 0
mirror of https://github.com/RGBCube/serenity synced 2025-05-31 16:38:10 +00:00

LibGUI: Convert GSlider to ObjectPtr

This commit is contained in:
Andreas Kling 2019-09-21 16:33:53 +02:00
parent a50cfc5f1f
commit 7aaad27778
4 changed files with 11 additions and 9 deletions

View file

@ -3,13 +3,13 @@
#include <LibGUI/GWidget.h>
class GSlider : public GWidget {
C_OBJECT(GSlider)
public:
enum class KnobSizeMode {
Fixed,
Proportional,
};
GSlider(Orientation, GWidget*);
virtual ~GSlider() override;
Orientation orientation() const { return m_orientation; }
@ -43,6 +43,8 @@ public:
Function<void(int)> on_value_changed;
protected:
GSlider(Orientation, GWidget*);
virtual void paint_event(GPaintEvent&) override;
virtual void mousedown_event(GMouseEvent&) override;
virtual void mousemove_event(GMouseEvent&) override;