1
Fork 0
mirror of https://github.com/RGBCube/serenity synced 2025-05-21 09:25:06 +00:00

LibDraw: Put all classes in the Gfx namespace

I started adding things to a Draw namespace, but it somehow felt really
wrong seeing Draw::Rect and Draw::Bitmap, etc. So instead, let's rename
the library to LibGfx. :^)
This commit is contained in:
Andreas Kling 2020-02-06 11:56:38 +01:00
parent 939a605334
commit 11580babbf
269 changed files with 1513 additions and 1315 deletions

View file

@ -118,7 +118,7 @@ void ScrollableWidget::update_scrollbar_ranges()
m_vertical_scrollbar->set_big_step(visible_content_rect().height() - m_vertical_scrollbar->step());
}
void ScrollableWidget::set_content_size(const Size& size)
void ScrollableWidget::set_content_size(const Gfx::Size& size)
{
if (m_content_size == size)
return;
@ -126,7 +126,7 @@ void ScrollableWidget::set_content_size(const Size& size)
update_scrollbar_ranges();
}
void ScrollableWidget::set_size_occupied_by_fixed_elements(const Size& size)
void ScrollableWidget::set_size_occupied_by_fixed_elements(const Gfx::Size& size)
{
if (m_size_occupied_by_fixed_elements == size)
return;
@ -154,14 +154,14 @@ Rect ScrollableWidget::visible_content_rect() const
};
}
void ScrollableWidget::scroll_into_view(const Rect& rect, Orientation orientation)
void ScrollableWidget::scroll_into_view(const Gfx::Rect& rect, Orientation orientation)
{
if (orientation == Orientation::Vertical)
return scroll_into_view(rect, false, true);
return scroll_into_view(rect, true, false);
}
void ScrollableWidget::scroll_into_view(const Rect& rect, bool scroll_horizontally, bool scroll_vertically)
void ScrollableWidget::scroll_into_view(const Gfx::Rect& rect, bool scroll_horizontally, bool scroll_vertically)
{
auto visible_content_rect = this->visible_content_rect();
if (visible_content_rect.contains(rect))
@ -209,7 +209,7 @@ Rect ScrollableWidget::widget_inner_rect() const
return rect;
}
Point ScrollableWidget::to_content_position(const Point& widget_position) const
Point ScrollableWidget::to_content_position(const Gfx::Point& widget_position) const
{
auto content_position = widget_position;
content_position.move_by(horizontal_scrollbar().value(), vertical_scrollbar().value());
@ -217,7 +217,7 @@ Point ScrollableWidget::to_content_position(const Point& widget_position) const
return content_position;
}
Point ScrollableWidget::to_widget_position(const Point& content_position) const
Point ScrollableWidget::to_widget_position(const Gfx::Point& content_position) const
{
auto widget_position = content_position;
widget_position.move_by(-horizontal_scrollbar().value(), -vertical_scrollbar().value());