1
Fork 0
mirror of https://github.com/RGBCube/serenity synced 2025-05-31 07:38:10 +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

@ -44,8 +44,8 @@
HexEditor::HexEditor(GUI::Widget* parent)
: ScrollableWidget(parent)
{
set_frame_shape(FrameShape::Container);
set_frame_shadow(FrameShadow::Sunken);
set_frame_shape(Gfx::FrameShape::Container);
set_frame_shadow(Gfx::FrameShadow::Sunken);
set_frame_thickness(2);
set_scrollbars_enabled(true);
set_font(GFontDatabase::the().get_by_name("Csilla Thin"));
@ -544,7 +544,7 @@ void HexEditor::paint_event(GUI::PaintEvent& event)
}
auto line = String::format("%02X", m_buffer[byte_position]);
painter.draw_text(hex_display_rect, line, TextAlignment::TopLeft, text_color);
painter.draw_text(hex_display_rect, line, Gfx::TextAlignment::TopLeft, text_color);
Rect text_display_rect {
frame_thickness() + offset_margin_width() + (bytes_per_row() * (character_width() * 3)) + (j * character_width()) + 20,
@ -559,7 +559,7 @@ void HexEditor::paint_event(GUI::PaintEvent& event)
painter.fill_rect(text_display_rect, Color::from_rgb(0xCCCCCC));
}
painter.draw_text(text_display_rect, String::format("%c", isprint(m_buffer[byte_position]) ? m_buffer[byte_position] : '.'), TextAlignment::TopLeft, text_color);
painter.draw_text(text_display_rect, String::format("%c", isprint(m_buffer[byte_position]) ? m_buffer[byte_position] : '.'), Gfx::TextAlignment::TopLeft, text_color);
}
}
}