mirror of
https://github.com/RGBCube/serenity
synced 2025-07-25 15:17:36 +00:00
LibGfx: Unify Rect, Point, and Size
This commit unifies methods and method/param names between the above classes, as well as adds [[nodiscard]] and ALWAYS_INLINE where appropriate. It also renamed the various move_by methods to translate_by, as that more closely matches the transformation terminology.
This commit is contained in:
parent
ac238b3bd6
commit
88cfaf7bf0
48 changed files with 282 additions and 187 deletions
|
@ -201,14 +201,14 @@ void Scrollbar::paint_event(PaintEvent& event)
|
|||
if (length(orientation()) > default_button_size()) {
|
||||
auto decrement_location = decrement_button_rect().location().translated(3, 3);
|
||||
if (decrement_pressed)
|
||||
decrement_location.move_by(1, 1);
|
||||
decrement_location.translate_by(1, 1);
|
||||
if (!has_scrubber() || !is_enabled())
|
||||
painter.draw_bitmap(decrement_location.translated(1, 1), orientation() == Orientation::Vertical ? *s_up_arrow_bitmap : *s_left_arrow_bitmap, palette().threed_highlight());
|
||||
painter.draw_bitmap(decrement_location, orientation() == Orientation::Vertical ? *s_up_arrow_bitmap : *s_left_arrow_bitmap, (has_scrubber() && is_enabled()) ? palette().button_text() : palette().threed_shadow1());
|
||||
|
||||
auto increment_location = increment_button_rect().location().translated(3, 3);
|
||||
if (increment_pressed)
|
||||
increment_location.move_by(1, 1);
|
||||
increment_location.translate_by(1, 1);
|
||||
if (!has_scrubber() || !is_enabled())
|
||||
painter.draw_bitmap(increment_location.translated(1, 1), orientation() == Orientation::Vertical ? *s_down_arrow_bitmap : *s_right_arrow_bitmap, palette().threed_highlight());
|
||||
painter.draw_bitmap(increment_location, orientation() == Orientation::Vertical ? *s_down_arrow_bitmap : *s_right_arrow_bitmap, (has_scrubber() && is_enabled()) ? palette().button_text() : palette().threed_shadow1());
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue