mirror of
https://github.com/eried/portapack-mayhem.git
synced 2025-06-27 16:17:31 -04:00
Hide ui::Size implementation.
This commit is contained in:
parent
aac2d31548
commit
d15ace4676
9 changed files with 44 additions and 32 deletions
|
@ -351,13 +351,13 @@ void Button::paint(Painter& painter) {
|
|||
painter.draw_rectangle(r, style().foreground);
|
||||
|
||||
painter.fill_rectangle(
|
||||
{ r.pos.x() + 1, r.pos.y() + 1, r.size.w - 2, r.size.h - 2 },
|
||||
{ r.pos.x() + 1, r.pos.y() + 1, r.size.width() - 2, r.size.height() - 2 },
|
||||
paint_style.background
|
||||
);
|
||||
|
||||
const auto label_r = paint_style.font.size_of(text_);
|
||||
painter.draw_string(
|
||||
{ r.pos.x() + (r.size.w - label_r.w) / 2, r.pos.y() + (r.size.h - label_r.h) / 2 },
|
||||
{ r.pos.x() + (r.size.width() - label_r.width()) / 2, r.pos.y() + (r.size.height() - label_r.height()) / 2 },
|
||||
paint_style,
|
||||
text_
|
||||
);
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue