diff options
author | Andreas Kling <kling@serenityos.org> | 2020-06-10 10:57:59 +0200 |
---|---|---|
committer | Andreas Kling <kling@serenityos.org> | 2020-06-10 10:59:04 +0200 |
commit | 116cf92156090bb3f5c15d5be145f1283884d65d (patch) | |
tree | 4496ab3e8c90add1c40da2eceee71324369ec0c6 /Libraries/LibGUI/ScrollBar.cpp | |
parent | 656b01eb0fb659fb2d3ee4e6e4413a82543414e3 (diff) | |
download | serenity-116cf92156090bb3f5c15d5be145f1283884d65d.zip |
LibGfx: Rename Rect,Point,Size => IntRect,IntPoint,IntSize
This fits nicer with FloatRect,FloatPoint,FloatSize and gives a much
better visual clue about what type of metric is being used.
Diffstat (limited to 'Libraries/LibGUI/ScrollBar.cpp')
-rw-r--r-- | Libraries/LibGUI/ScrollBar.cpp | 10 |
1 files changed, 5 insertions, 5 deletions
diff --git a/Libraries/LibGUI/ScrollBar.cpp b/Libraries/LibGUI/ScrollBar.cpp index 3844ad2330..c5a56e373d 100644 --- a/Libraries/LibGUI/ScrollBar.cpp +++ b/Libraries/LibGUI/ScrollBar.cpp @@ -143,12 +143,12 @@ void ScrollBar::set_value(int value) update(); } -Gfx::Rect ScrollBar::decrement_button_rect() const +Gfx::IntRect ScrollBar::decrement_button_rect() const { return { 0, 0, button_width(), button_height() }; } -Gfx::Rect ScrollBar::increment_button_rect() const +Gfx::IntRect ScrollBar::increment_button_rect() const { if (orientation() == Orientation::Vertical) return { 0, height() - button_height(), button_width(), button_height() }; @@ -156,7 +156,7 @@ Gfx::Rect ScrollBar::increment_button_rect() const return { width() - button_width(), 0, button_width(), button_height() }; } -Gfx::Rect ScrollBar::decrement_gutter_rect() const +Gfx::IntRect ScrollBar::decrement_gutter_rect() const { if (orientation() == Orientation::Vertical) return { 0, button_height(), button_width(), scrubber_rect().top() - button_height() }; @@ -164,7 +164,7 @@ Gfx::Rect ScrollBar::decrement_gutter_rect() const return { button_width(), 0, scrubber_rect().x() - button_width(), button_height() }; } -Gfx::Rect ScrollBar::increment_gutter_rect() const +Gfx::IntRect ScrollBar::increment_gutter_rect() const { auto scrubber_rect = this->scrubber_rect(); if (orientation() == Orientation::Vertical) @@ -193,7 +193,7 @@ int ScrollBar::scrubber_size() const return ::max(pixel_range - value_range, button_size()); } -Gfx::Rect ScrollBar::scrubber_rect() const +Gfx::IntRect ScrollBar::scrubber_rect() const { if (!has_scrubber() || length(orientation()) <= (button_size() * 2) + scrubber_size()) return {}; |