mirror of
https://github.com/RGBCube/serenity
synced 2025-07-26 23:37:36 +00:00
LibGfx: Unpublish Gfx::Rect from global namespace
This commit is contained in:
parent
c39d44fc2e
commit
20cfd2a6bf
78 changed files with 262 additions and 260 deletions
|
@ -70,7 +70,7 @@ void GlyphEditorWidget::paint_event(GUI::PaintEvent& event)
|
|||
|
||||
for (int y = 0; y < font().glyph_height(); ++y) {
|
||||
for (int x = 0; x < font().max_glyph_width(); ++x) {
|
||||
Rect rect { x * m_scale, y * m_scale, m_scale, m_scale };
|
||||
Gfx::Rect rect { x * m_scale, y * m_scale, m_scale, m_scale };
|
||||
if (x >= font().glyph_width(m_glyph)) {
|
||||
painter.fill_rect(rect, Color::MidGray);
|
||||
} else {
|
||||
|
|
|
@ -62,11 +62,11 @@ void GlyphMapWidget::set_selected_glyph(u8 glyph)
|
|||
update();
|
||||
}
|
||||
|
||||
Rect GlyphMapWidget::get_outer_rect(u8 glyph) const
|
||||
Gfx::Rect GlyphMapWidget::get_outer_rect(u8 glyph) const
|
||||
{
|
||||
int row = glyph / columns();
|
||||
int column = glyph % columns();
|
||||
return Rect {
|
||||
return Gfx::Rect {
|
||||
column * (font().max_glyph_width() + m_horizontal_spacing) + 1,
|
||||
row * (font().glyph_height() + m_vertical_spacing) + 1,
|
||||
font().max_glyph_width() + m_horizontal_spacing,
|
||||
|
@ -94,8 +94,8 @@ void GlyphMapWidget::paint_event(GUI::PaintEvent& event)
|
|||
|
||||
for (int row = 0; row < rows(); ++row) {
|
||||
for (int column = 0; column < columns(); ++column, ++glyph) {
|
||||
Rect outer_rect = get_outer_rect(glyph);
|
||||
Rect inner_rect(
|
||||
Gfx::Rect outer_rect = get_outer_rect(glyph);
|
||||
Gfx::Rect inner_rect(
|
||||
outer_rect.x() + m_horizontal_spacing / 2,
|
||||
outer_rect.y() + m_vertical_spacing / 2,
|
||||
font().max_glyph_width(),
|
||||
|
|
|
@ -55,7 +55,7 @@ private:
|
|||
virtual void paint_event(GUI::PaintEvent&) override;
|
||||
virtual void mousedown_event(GUI::MouseEvent&) override;
|
||||
|
||||
Rect get_outer_rect(u8 glyph) const;
|
||||
Gfx::Rect get_outer_rect(u8 glyph) const;
|
||||
|
||||
RefPtr<Gfx::Font> m_font;
|
||||
int m_rows { 8 };
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue