some more minor dialog refinements

This commit is contained in:
thrust26 2018-01-23 17:51:38 +01:00
parent 795c84de9d
commit 5121a73210
3 changed files with 8 additions and 9 deletions

View File

@ -60,7 +60,6 @@ HelpDialog::HelpDialog(OSystem& osystem, DialogContainer& parent,
new ButtonWidget(this, font, xpos, ypos, buttonWidth, buttonHeight,
"Close", GuiObject::kCloseCmd);
wid.push_back(b);
addOKWidget(b); addCancelWidget(b);
xpos = 5; ypos = 5;
myTitle = new StaticTextWidget(this, font, xpos, ypos, _w - 10, fontHeight,

View File

@ -57,7 +57,6 @@ LoggerDialog::LoggerDialog(OSystem& osystem, DialogContainer& parent,
ypos += myLogInfo->getHeight() + 8;
// Level of logging (how much info to print)
xpos += 20;
VariantList items;
VarList::push_back(items, "None", "0");
VarList::push_back(items, "Basic", "1");
@ -69,8 +68,8 @@ LoggerDialog::LoggerDialog(OSystem& osystem, DialogContainer& parent,
wid.push_back(myLogLevel);
// Should log output also be shown on the console?
xpos += myLogLevel->getWidth() + 30;
myLogToConsole = new CheckboxWidget(this, font, xpos, ypos, "Print to console");
xpos += myLogLevel->getWidth() + 32;
myLogToConsole = new CheckboxWidget(this, font, xpos, ypos + 1, "Print to console");
wid.push_back(myLogToConsole);
// Add Save, OK and Cancel buttons

View File

@ -43,7 +43,8 @@ UIDialog::UIDialog(OSystem& osystem, DialogContainer& parent,
fontHeight = font.getFontHeight(),
buttonWidth = font.getStringWidth("Defaults") + 20,
buttonHeight = font.getLineHeight() + 4;
const int vBorder = 5;
const int VBORDER = 5;
const int HBORDER = 10;
int xpos, ypos, tabID;
int lwidth, pwidth = font.getStringWidth("Standard");
WidgetArray wid;
@ -56,7 +57,7 @@ UIDialog::UIDialog(OSystem& osystem, DialogContainer& parent,
_h = 11 * (lineHeight + 4) + 10;
// The tab widget
xpos = ypos = vBorder;
xpos = ypos = VBORDER;
myTab = new TabWidget(this, font, xpos, ypos, _w - 2*xpos, _h - buttonHeight - 20);
addTabWidget(myTab);
@ -127,7 +128,7 @@ UIDialog::UIDialog(OSystem& osystem, DialogContainer& parent,
ypos += lineHeight + 4;
// Add message concerning usage
xpos = vBorder; ypos += 1*(lineHeight + 4);
xpos = VBORDER; ypos += 1*(lineHeight + 4);
lwidth = ifont.getStringWidth("(*) Changes require application restart");
new StaticTextWidget(myTab, ifont, xpos, ypos, std::min(lwidth, _w-20), fontHeight,
"(*) Changes require application restart",
@ -142,7 +143,7 @@ UIDialog::UIDialog(OSystem& osystem, DialogContainer& parent,
tabID = myTab->addTab(" Misc. ");
lwidth = font.getStringWidth("Interface Palette (*) ");
pwidth = font.getStringWidth("Standard");
xpos = ypos = vBorder;
xpos = ypos = VBORDER;
// UI Palette
ypos += 1;
@ -189,7 +190,7 @@ UIDialog::UIDialog(OSystem& osystem, DialogContainer& parent,
ypos += lineHeight + 4;
// Add message concerning usage
xpos = vBorder; ypos += 1*(lineHeight + 4);
xpos = VBORDER; ypos += 1*(lineHeight + 4);
lwidth = ifont.getStringWidth("(*) Requires application restart");
new StaticTextWidget(myTab, ifont, xpos, ypos, std::min(lwidth, _w-20), fontHeight,
"(*) Requires application restart",