diff options
Diffstat (limited to 'Widgets/Button.cpp')
-rw-r--r-- | Widgets/Button.cpp | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/Widgets/Button.cpp b/Widgets/Button.cpp index f42977dafb..b5648252f0 100644 --- a/Widgets/Button.cpp +++ b/Widgets/Button.cpp @@ -22,9 +22,9 @@ void Button::setCaption(String&& caption) void Button::onPaint(PaintEvent&) { Painter painter(*this); - painter.fillRect({ 0, 0, width(), height() }, backgroundColor()); + painter.fillRect(rect(), backgroundColor()); if (!caption().isEmpty()) { - painter.drawText({ 0, 0, width(), height() }, caption(), Painter::TextAlignment::Center, Color(0, 0, 0)); + painter.drawText(rect(), caption(), Painter::TextAlignment::Center, Color(0, 0, 0)); } } |