larger infoFont for minimal UI dialogs

This commit is contained in:
thrust26 2020-03-16 09:26:45 +01:00
parent 96f2d55133
commit b0af3891fe
2 changed files with 14 additions and 5 deletions

View File

@ -116,13 +116,20 @@ bool FrameBuffer::initialize()
// The general font used in all UI elements // The general font used in all UI elements
// This is determined by the size of the framebuffer // This is determined by the size of the framebuffer
if(myOSystem.settings().getBool("minimal_ui")) if(myOSystem.settings().getBool("minimal_ui"))
{
myFont = make_unique<GUI::Font>(GUI::stella12x24tDesc); // 12x24 myFont = make_unique<GUI::Font>(GUI::stella12x24tDesc); // 12x24
// The info font used in all UI elements
// This is determined by the size of the framebuffer
myInfoFont = make_unique<GUI::Font>(GUI::stellaLargeDesc); // 10x20
}
else else
{
myFont = make_unique<GUI::Font>(GUI::stellaMediumDesc); // 9x18 myFont = make_unique<GUI::Font>(GUI::stellaMediumDesc); // 9x18
// The info font used in all UI elements // The info font used in all UI elements
// This is determined by the size of the framebuffer // This is determined by the size of the framebuffer
myInfoFont = make_unique<GUI::Font>(GUI::consoleDesc); // 8x13 myInfoFont = make_unique<GUI::Font>(GUI::consoleDesc); // 8x13
}
// The font used by the ROM launcher // The font used by the ROM launcher
const string& lf = myOSystem.settings().getString("launcherfont"); const string& lf = myOSystem.settings().getString("launcherfont");

View File

@ -39,7 +39,8 @@ StellaSettingsDialog::StellaSettingsDialog(OSystem& osystem, DialogContainer& pa
const int buttonHeight = _font.getLineHeight() + 6, const int buttonHeight = _font.getLineHeight() + 6,
lineHeight = _font.getLineHeight(), lineHeight = _font.getLineHeight(),
fontWidth = _font.getMaxCharWidth(), fontWidth = _font.getMaxCharWidth(),
buttonWidth = _font.getStringWidth("Help" + ELLIPSIS) + 32; buttonWidth = _font.getStringWidth("Help" + ELLIPSIS) + 32,
iLineHeight = instance().frameBuffer().infoFont().getLineHeight();
const int VGAP = 5; const int VGAP = 5;
int xpos, ypos; int xpos, ypos;
ButtonWidget* bw = nullptr; ButtonWidget* bw = nullptr;
@ -48,7 +49,8 @@ StellaSettingsDialog::StellaSettingsDialog(OSystem& osystem, DialogContainer& pa
VariantList items; VariantList items;
// Set real dimensions // Set real dimensions
setSize(35 * fontWidth + HBORDER * 2 + 3, 15 * (lineHeight + VGAP) + VGAP * 9 + 10 + _th, max_w, max_h); setSize(35 * fontWidth + HBORDER * 2 + 3, 10 * (lineHeight + VGAP) + 3 * (iLineHeight + VGAP)
+ VGAP * (12 + 2) + buttonHeight * 2 + _th, max_w, max_h);
xpos = HBORDER; xpos = HBORDER;
ypos = VBORDER + _th; ypos = VBORDER + _th;