mirror of
https://github.com/RGBCube/serenity
synced 2025-05-23 18:35:07 +00:00
LibGUI: Improve GScrollBar button look a bit.
The arrows look better when they're sharp. :^)
This commit is contained in:
parent
ddd580c30f
commit
8313ce57dc
3 changed files with 36 additions and 27 deletions
|
@ -5,9 +5,11 @@
|
|||
|
||||
class GScrollBar final : public GWidget {
|
||||
public:
|
||||
explicit GScrollBar(GWidget* parent);
|
||||
explicit GScrollBar(Orientation, GWidget* parent);
|
||||
virtual ~GScrollBar() override;
|
||||
|
||||
Orientation orientation() const { return m_orientation; }
|
||||
|
||||
int value() const { return m_value; }
|
||||
int min() const { return m_min; }
|
||||
int max() const { return m_max; }
|
||||
|
@ -29,7 +31,7 @@ private:
|
|||
virtual void mousemove_event(GMouseEvent&) override;
|
||||
virtual const char* class_name() const override { return "GScrollBar"; }
|
||||
|
||||
int button_size() const { return 16; }
|
||||
int button_size() const { return orientation() == Orientation::Vertical ? width() : height(); }
|
||||
Rect up_button_rect() const;
|
||||
Rect down_button_rect() const;
|
||||
Rect upper_gutter_rect() const;
|
||||
|
@ -46,4 +48,6 @@ private:
|
|||
bool m_scrubbing { false };
|
||||
int m_scrub_start_value { 0 };
|
||||
Point m_scrub_origin;
|
||||
|
||||
Orientation m_orientation { Orientation::Vertical };
|
||||
};
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue