mirror of
https://github.com/RGBCube/serenity
synced 2025-07-02 23:32:06 +00:00
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.
This commit is contained in:
parent
656b01eb0f
commit
116cf92156
212 changed files with 1144 additions and 1144 deletions
|
@ -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 {};
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue