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:
@@ -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);
|
||||
|
||||
Reference in New Issue
Block a user