1
Fork 0
mirror of https://github.com/RGBCube/serenity synced 2025-05-17 11:55:08 +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

@ -55,7 +55,7 @@ void Button::paint_event(PaintEvent& event)
Painter painter(*this);
painter.add_clip_rect(event.rect());
StylePainter::paint_button(painter, rect(), palette(), m_button_style, is_being_pressed(), is_hovered(), is_checked(), is_enabled());
Gfx::StylePainter::paint_button(painter, rect(), palette(), m_button_style, is_being_pressed(), is_hovered(), is_checked(), is_enabled());
if (text().is_empty() && !m_icon)
return;
@ -72,7 +72,7 @@ void Button::paint_event(PaintEvent& event)
else
painter.blit_dimmed(icon_location, *m_icon, m_icon->rect());
}
auto& font = is_checked() ? Font::default_bold_font() : this->font();
auto& font = is_checked() ? Gfx::Font::default_bold_font() : this->font();
if (m_icon && !text().is_empty()) {
content_rect.move_by(m_icon->width() + 4, 0);
content_rect.set_width(content_rect.width() - m_icon->width() - 4);
@ -110,7 +110,7 @@ void Button::set_action(Action& action)
set_checked(action.is_checked());
}
void Button::set_icon(RefPtr<GraphicsBitmap>&& icon)
void Button::set_icon(RefPtr<Gfx::Bitmap>&& icon)
{
if (m_icon == icon)
return;