1
Fork 0
mirror of https://github.com/RGBCube/serenity synced 2025-05-28 00:05:08 +00:00

Make the widgets code build on macOS.

Funny, I haven't looked at this code in a few weeks and there's so much to change!
This commit is contained in:
Andreas Kling 2018-12-02 23:41:10 +01:00
parent 85b886c2e0
commit dd502bb54e
3 changed files with 19 additions and 13 deletions

View file

@ -10,14 +10,14 @@ void MsgBox(Window* owner, String&& text)
Font& font = Font::defaultFont();
auto screenRect = AbstractScreen::the().rect();
unsigned textWidth = text.length() * font.glyphWidth() + 8;
unsigned textHeight = font.glyphHeight() + 8;
unsigned horizontalPadding = 16;
unsigned verticalPadding = 16;
unsigned buttonWidth = 60;
unsigned buttonHeight = 20;
unsigned windowWidth = textWidth + horizontalPadding * 2;
unsigned windowHeight = textHeight + buttonHeight + verticalPadding * 3;
int textWidth = text.length() * font.glyphWidth() + 8;
int textHeight = font.glyphHeight() + 8;
int horizontalPadding = 16;
int verticalPadding = 16;
int buttonWidth = 60;
int buttonHeight = 20;
int windowWidth = textWidth + horizontalPadding * 2;
int windowHeight = textHeight + buttonHeight + verticalPadding * 3;
Rect windowRect(
screenRect.center().x() - windowWidth / 2,