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

GSlider: Highlight the knob when hovering it. :^)

This commit is contained in:
Andreas Kling 2019-04-30 00:47:46 +02:00
parent 55d7d4e3d8
commit 87c256a7d5
2 changed files with 20 additions and 1 deletions

View file

@ -28,12 +28,16 @@ protected:
virtual void mousedown_event(GMouseEvent&) override;
virtual void mousemove_event(GMouseEvent&) override;
virtual void mouseup_event(GMouseEvent&) override;
virtual void leave_event(CEvent&) override;
private:
void set_knob_hovered(bool);
int m_value { 0 };
int m_min { 0 };
int m_max { 100 };
bool m_knob_hovered { false };
bool m_dragging { false };
int m_drag_origin_value { 0 };
Point m_drag_origin;