mirror of
https://github.com/fergalmoran/ladybird.git
synced 2026-01-03 23:25:20 +00:00
LibGfx: Rename Rect,Point,Size => IntRect,IntPoint,IntSize
This fits nicer with FloatRect,FloatPoint,FloatSize and gives a much better visual clue about what type of metric is being used.
This commit is contained in:
@@ -42,7 +42,7 @@ RadioButton::~RadioButton()
|
||||
{
|
||||
}
|
||||
|
||||
Gfx::Size RadioButton::circle_size()
|
||||
Gfx::IntSize RadioButton::circle_size()
|
||||
{
|
||||
return { 12, 12 };
|
||||
}
|
||||
@@ -58,12 +58,12 @@ void RadioButton::paint_event(PaintEvent& event)
|
||||
if (is_enabled() && is_hovered())
|
||||
painter.fill_rect(rect(), palette().hover_highlight());
|
||||
|
||||
Gfx::Rect circle_rect { { 2, 0 }, circle_size() };
|
||||
Gfx::IntRect circle_rect { { 2, 0 }, circle_size() };
|
||||
circle_rect.center_vertically_within(rect());
|
||||
|
||||
Gfx::StylePainter::paint_radio_button(painter, circle_rect, palette(), is_checked(), is_being_pressed());
|
||||
|
||||
Gfx::Rect text_rect { circle_rect.right() + 4, 0, font().width(text()), font().glyph_height() };
|
||||
Gfx::IntRect text_rect { circle_rect.right() + 4, 0, font().width(text()), font().glyph_height() };
|
||||
text_rect.center_vertically_within(rect());
|
||||
paint_text(painter, text_rect, font(), Gfx::TextAlignment::TopLeft);
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user