added ellipsis to audit dialog

This commit is contained in:
thrust26 2017-10-04 12:26:11 +02:00
parent af30b05734
commit 0cbceda36d
3 changed files with 20 additions and 19 deletions

View File

@ -449,7 +449,7 @@ bool Debugger::rewindState()
mySystem.clearDirtyPages(); mySystem.clearDirtyPages();
unlockBankswitchState(); unlockBankswitchState();
bool result = r.rewindState(); bool result = r.rewindEmulationState();
lockBankswitchState(); lockBankswitchState();
myDialog->rewindButton().setEnabled(!r.empty()); myDialog->rewindButton().setEnabled(!r.empty());

View File

@ -193,7 +193,7 @@ void InputDialog::addDevicePortTab(const GUI::Font& font)
wid.push_back(myTrackBallSpeed); wid.push_back(myTrackBallSpeed);
// Add 'allow all 4 directions' for joystick // Add 'allow all 4 directions' for joystick
ypos += lineHeight + 12; ypos += lineHeight + vGap*3;
myAllowAll4 = new CheckboxWidget(myTab, font, hSpace, ypos, myAllowAll4 = new CheckboxWidget(myTab, font, hSpace, ypos,
"Allow all 4 directions on joystick"); "Allow all 4 directions on joystick");
wid.push_back(myAllowAll4); wid.push_back(myAllowAll4);

View File

@ -39,48 +39,49 @@ RomAuditDialog::RomAuditDialog(OSystem& osystem, DialogContainer& parent,
myMaxWidth(max_w), myMaxWidth(max_w),
myMaxHeight(max_h) myMaxHeight(max_h)
{ {
const int vBorder = 8; const int vBorder = 10;
const int hBorder = 10;
const int lineHeight = font.getLineHeight(), const int lineHeight = font.getLineHeight(),
fontWidth = font.getMaxCharWidth(), fontWidth = font.getMaxCharWidth(),
fontHeight = font.getFontHeight(), fontHeight = font.getFontHeight(),
buttonWidth = font.getStringWidth("Audit path") + 20, buttonWidth = font.getStringWidth("Audit path" + ELLIPSIS) + 20,
buttonHeight = font.getLineHeight() + 4, buttonHeight = font.getLineHeight() + 4,
lwidth = font.getStringWidth("ROMs without properties (skipped) "); lwidth = font.getStringWidth("ROMs without properties (skipped) ");
int xpos = vBorder, ypos = vBorder; int xpos, ypos = vBorder;
WidgetArray wid; WidgetArray wid;
// Set real dimensions // Set real dimensions
_w = 44 * fontWidth + 10; _w = 54 * fontWidth + 10;
_h = 7 * (lineHeight + 4) + 10; _h = 7 * (lineHeight + 4) + 10;
// Audit path // Audit path
ButtonWidget* romButton = ButtonWidget* romButton =
new ButtonWidget(this, font, xpos, ypos, buttonWidth, buttonHeight, new ButtonWidget(this, font, hBorder, ypos, buttonWidth, buttonHeight,
"Audit path", kChooseAuditDirCmd); "Audit path" + ELLIPSIS, kChooseAuditDirCmd);
wid.push_back(romButton); wid.push_back(romButton);
xpos += buttonWidth + 10; xpos = hBorder + buttonWidth + 10;
myRomPath = new EditTextWidget(this, font, xpos, ypos + 2, myRomPath = new EditTextWidget(this, font, xpos, ypos + 2,
_w - xpos - 10, lineHeight, ""); _w - xpos - hBorder, lineHeight, "");
wid.push_back(myRomPath); wid.push_back(myRomPath);
// Show results of ROM audit // Show results of ROM audit
xpos = vBorder + 10; ypos += buttonHeight + 10; ypos += buttonHeight + 16;
new StaticTextWidget(this, font, xpos, ypos, lwidth, fontHeight, new StaticTextWidget(this, font, hBorder, ypos, lwidth, fontHeight,
"ROMs with properties (renamed) ", kTextAlignLeft); "ROMs with properties (renamed) ", kTextAlignLeft);
myResults1 = new EditTextWidget(this, font, xpos + lwidth, ypos - 2, myResults1 = new EditTextWidget(this, font, hBorder + lwidth, ypos - 2,
_w - xpos - lwidth - 10, lineHeight, ""); _w - hBorder*2 - lwidth, lineHeight, "");
myResults1->setEditable(false, true); myResults1->setEditable(false, true);
ypos += buttonHeight; ypos += buttonHeight;
new StaticTextWidget(this, font, xpos, ypos, lwidth, fontHeight, new StaticTextWidget(this, font, hBorder, ypos, lwidth, fontHeight,
"ROMs without properties (skipped) ", kTextAlignLeft); "ROMs without properties (skipped) ", kTextAlignLeft);
myResults2 = new EditTextWidget(this, font, xpos + lwidth, ypos - 2, myResults2 = new EditTextWidget(this, font, hBorder + lwidth, ypos - 2,
_w - xpos - lwidth - 10, lineHeight, ""); _w - hBorder*2 - lwidth, lineHeight, "");
myResults2->setEditable(false, true); myResults2->setEditable(false, true);
ypos += buttonHeight + 8; ypos += buttonHeight + 8;
new StaticTextWidget(this, font, xpos, ypos, _w - 20, fontHeight, new StaticTextWidget(this, font, hBorder, ypos, _w - 20, fontHeight,
"(*) WARNING: operation cannot be undone", "(*) WARNING: operation cannot be undone!",
kTextAlignLeft); kTextAlignLeft);
// Add OK and Cancel buttons // Add OK and Cancel buttons