mirror of
https://github.com/RGBCube/serenity
synced 2025-05-31 13:28:11 +00:00
Let widget have a font() instead of using Font::defaultFont() everywhere.
This commit is contained in:
parent
e5acbca0e8
commit
fc1facf5c0
8 changed files with 32 additions and 25 deletions
|
@ -1,7 +1,6 @@
|
|||
#include "CheckBox.h"
|
||||
#include "Painter.h"
|
||||
#include "CBitmap.h"
|
||||
#include "Font.h"
|
||||
#include <cstdio>
|
||||
|
||||
CheckBox::CheckBox(Widget* parent)
|
||||
|
@ -81,7 +80,7 @@ void CheckBox::paintEvent(PaintEvent&)
|
|||
|
||||
auto textRect = rect();
|
||||
textRect.setLeft(bitmap->width() + 4);
|
||||
textRect.setTop(height() / 2 - Font::defaultFont().glyphHeight() / 2);
|
||||
textRect.setTop(height() / 2 - font().glyphHeight() / 2);
|
||||
|
||||
Point bitmapPosition;
|
||||
bitmapPosition.setX(2);
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue