mirror of
https://github.com/RGBCube/serenity
synced 2025-05-31 10:38:11 +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:
parent
656b01eb0f
commit
116cf92156
212 changed files with 1144 additions and 1144 deletions
|
@ -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);
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue