From adcbc17bf5148f92ff62b99a9bafc95831b4501d Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Axel=20D=C3=B6rfler?= Date: Mon, 14 Sep 2015 20:31:52 +0200 Subject: [PATCH] DeskCalc: improve initial window size. * By making it scale with the font size. --- src/apps/deskcalc/CalcApplication.cpp | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/src/apps/deskcalc/CalcApplication.cpp b/src/apps/deskcalc/CalcApplication.cpp index 23d8f2aaa6..9fb468292c 100644 --- a/src/apps/deskcalc/CalcApplication.cpp +++ b/src/apps/deskcalc/CalcApplication.cpp @@ -1,5 +1,5 @@ /* - * Copyright 2006-2012 Haiku, Inc. All Rights Reserved. + * Copyright 2006-2015 Haiku, Inc. All Rights Reserved. * Copyright 1997, 1998 R3 Software Ltd. All Rights Reserved. * Distributed under the terms of the MIT License. * @@ -57,7 +57,9 @@ CalcApplication::ReadyToRun() BMessage settings; _LoadSettings(settings); - BRect frame(0, 0, kDefaultWindowWidth - 1, kDefaultWindowHeight - 1); + float scaling = be_plain_font->Size() / 12.0f; + BRect frame(0, 0, (kDefaultWindowWidth * scaling) - 1, + (kDefaultWindowHeight * scaling) - 1); fCalcWindow = new CalcWindow(frame, &settings); // reveal window