ScreenSaver: Set min window height by font height

...rather than font spacing which only scales linearly in the horizontal
direction. This sets the min window height nicely at 11pt font while
continuing to work at 12pt, 8pt, and 18pt.
This commit is contained in:
John Scipione
2013-09-10 18:09:50 -04:00
parent c8e6af02f2
commit 5041c8ae6e
@@ -846,10 +846,14 @@ ScreenSaverWindow::ScreenSaverWindow()
{
fSettings.Load();
float spacing = be_control_look->DefaultItemSpacing();
fMinWidth = ceilf(std::max(446.0f,
be_control_look->DefaultItemSpacing() * 44.6f));
fMinWidth = ceilf(std::max(446.0f, spacing * 44.6f));
fMinHeight = ceilf(std::max(325.0f, spacing * 32.5f));
font_height fontHeight;
be_plain_font->GetHeight(&fontHeight);
float textHeight = ceilf(fontHeight.ascent + fontHeight.descent);
fMinHeight = ceilf(std::max(325.0f, textHeight * 28));
// Create the password editing window
fPasswordWindow = new PasswordWindow(fSettings);