mirror of https://github.com/stella-emu/stella.git
minor UI alignment fixes
This commit is contained in:
parent
d9770ea260
commit
d0276ad4e4
|
@ -86,7 +86,7 @@ EventMappingWidget::EventMappingWidget(GuiObject* boss, const GUI::Font& font,
|
||||||
addFocusWidget(myActionsList);
|
addFocusWidget(myActionsList);
|
||||||
|
|
||||||
// Add remap, erase, cancel and default buttons
|
// Add remap, erase, cancel and default buttons
|
||||||
xpos = _w - HBORDER - buttonWidth;
|
xpos = _w - HBORDER - buttonWidth + 2;
|
||||||
myMapButton = new ButtonWidget(boss, font, xpos, ypos,
|
myMapButton = new ButtonWidget(boss, font, xpos, ypos,
|
||||||
buttonWidth, buttonHeight,
|
buttonWidth, buttonHeight,
|
||||||
"Map" + ELLIPSIS, kStartMapCmd);
|
"Map" + ELLIPSIS, kStartMapCmd);
|
||||||
|
|
|
@ -54,7 +54,7 @@ InputDialog::InputDialog(OSystem& osystem, DialogContainer& parent,
|
||||||
|
|
||||||
// Set real dimensions
|
// Set real dimensions
|
||||||
setSize(50 * fontWidth + HBORDER * 2,
|
setSize(50 * fontWidth + HBORDER * 2,
|
||||||
_th + VGAP * 3 + lineHeight + 13 * (lineHeight + VGAP) + VGAP * 7 + buttonHeight + VBORDER * 3,
|
_th + VGAP * 3 + lineHeight + 13 * (lineHeight + VGAP) + VGAP * 8 + buttonHeight + VBORDER * 3,
|
||||||
max_w, max_h);
|
max_w, max_h);
|
||||||
|
|
||||||
// The tab widget
|
// The tab widget
|
||||||
|
@ -68,7 +68,7 @@ InputDialog::InputDialog(OSystem& osystem, DialogContainer& parent,
|
||||||
tabID = myTab->addTab(" Emul. Events ", TabWidget::AUTO_WIDTH);
|
tabID = myTab->addTab(" Emul. Events ", TabWidget::AUTO_WIDTH);
|
||||||
myEmulEventMapper = new EventMappingWidget(myTab, _font, 2, 2,
|
myEmulEventMapper = new EventMappingWidget(myTab, _font, 2, 2,
|
||||||
myTab->getWidth(),
|
myTab->getWidth(),
|
||||||
myTab->getHeight() - 4,
|
myTab->getHeight() - VGAP,
|
||||||
EventMode::kEmulationMode);
|
EventMode::kEmulationMode);
|
||||||
myTab->setParentWidget(tabID, myEmulEventMapper);
|
myTab->setParentWidget(tabID, myEmulEventMapper);
|
||||||
addToFocusList(myEmulEventMapper->getFocusList(), myTab, tabID);
|
addToFocusList(myEmulEventMapper->getFocusList(), myTab, tabID);
|
||||||
|
@ -77,7 +77,7 @@ InputDialog::InputDialog(OSystem& osystem, DialogContainer& parent,
|
||||||
tabID = myTab->addTab(" UI Events ", TabWidget::AUTO_WIDTH);
|
tabID = myTab->addTab(" UI Events ", TabWidget::AUTO_WIDTH);
|
||||||
myMenuEventMapper = new EventMappingWidget(myTab, _font, 2, 2,
|
myMenuEventMapper = new EventMappingWidget(myTab, _font, 2, 2,
|
||||||
myTab->getWidth(),
|
myTab->getWidth(),
|
||||||
myTab->getHeight() - 4,
|
myTab->getHeight() - VGAP,
|
||||||
EventMode::kMenuMode);
|
EventMode::kMenuMode);
|
||||||
myTab->setParentWidget(tabID, myMenuEventMapper);
|
myTab->setParentWidget(tabID, myMenuEventMapper);
|
||||||
addToFocusList(myMenuEventMapper->getFocusList(), myTab, tabID);
|
addToFocusList(myMenuEventMapper->getFocusList(), myTab, tabID);
|
||||||
|
@ -108,7 +108,8 @@ void InputDialog::addDevicePortTab()
|
||||||
{
|
{
|
||||||
const int lineHeight = _font.getLineHeight(),
|
const int lineHeight = _font.getLineHeight(),
|
||||||
fontWidth = _font.getMaxCharWidth(),
|
fontWidth = _font.getMaxCharWidth(),
|
||||||
fontHeight = _font.getFontHeight();
|
fontHeight = _font.getFontHeight(),
|
||||||
|
buttonHeight = _font.getLineHeight() * 1.25;
|
||||||
const int VGAP = fontHeight / 4;
|
const int VGAP = fontHeight / 4;
|
||||||
const int VBORDER = fontHeight / 2;
|
const int VBORDER = fontHeight / 2;
|
||||||
const int HBORDER = fontWidth * 1.25;
|
const int HBORDER = fontWidth * 1.25;
|
||||||
|
@ -213,26 +214,26 @@ void InputDialog::addDevicePortTab()
|
||||||
// Add EEPROM erase (part 1/2)
|
// Add EEPROM erase (part 1/2)
|
||||||
ypos += VGAP * 3;
|
ypos += VGAP * 3;
|
||||||
fwidth = _font.getStringWidth("AtariVox/SaveKey");
|
fwidth = _font.getStringWidth("AtariVox/SaveKey");
|
||||||
lwidth = _font.getStringWidth("AtariVox/SaveKey");
|
new StaticTextWidget(myTab, _font, _w - HBORDER - 2 - fwidth, ypos,
|
||||||
new StaticTextWidget(myTab, _font, _w - HBORDER - 4 - (fwidth + lwidth) / 2, ypos,
|
|
||||||
"AtariVox/SaveKey");
|
"AtariVox/SaveKey");
|
||||||
|
|
||||||
// Show joystick database
|
// Show joystick database
|
||||||
ypos += lineHeight;
|
ypos += lineHeight;
|
||||||
myJoyDlgButton = new ButtonWidget(myTab, _font, HBORDER, ypos, 20,
|
lwidth = _font.getStringWidth("Joystick Database" + ELLIPSIS) + fontWidth * 2.5;
|
||||||
|
myJoyDlgButton = new ButtonWidget(myTab, _font, HBORDER, ypos, lwidth, buttonHeight,
|
||||||
"Joystick Database" + ELLIPSIS, kDBButtonPressed);
|
"Joystick Database" + ELLIPSIS, kDBButtonPressed);
|
||||||
wid.push_back(myJoyDlgButton);
|
wid.push_back(myJoyDlgButton);
|
||||||
|
|
||||||
// Add EEPROM erase (part 1/2)
|
// Add EEPROM erase (part 1/2)
|
||||||
myEraseEEPROMButton = new ButtonWidget(myTab, _font, _w - HBORDER - 4 - fwidth, ypos,
|
myEraseEEPROMButton = new ButtonWidget(myTab, _font, _w - HBORDER - 2 - fwidth, ypos,
|
||||||
fwidth, lineHeight+4,
|
fwidth, buttonHeight,
|
||||||
"Erase EEPROM", kEEButtonPressed);
|
"Erase EEPROM", kEEButtonPressed);
|
||||||
wid.push_back(myEraseEEPROMButton);
|
wid.push_back(myEraseEEPROMButton);
|
||||||
|
|
||||||
// Add AtariVox serial port
|
// Add AtariVox serial port
|
||||||
ypos += lineHeight + VGAP * 2;
|
ypos += lineHeight + VGAP * 2;
|
||||||
lwidth = _font.getStringWidth("AVox serial port ");
|
lwidth = _font.getStringWidth("AVox serial port ");
|
||||||
fwidth = _w - HBORDER * 2 - 4 - lwidth;
|
fwidth = _w - HBORDER * 2 - 2 - lwidth;
|
||||||
new StaticTextWidget(myTab, _font, HBORDER, ypos + 2, "AVox serial port ");
|
new StaticTextWidget(myTab, _font, HBORDER, ypos + 2, "AVox serial port ");
|
||||||
myAVoxPort = new EditTextWidget(myTab, _font, HBORDER + lwidth, ypos,
|
myAVoxPort = new EditTextWidget(myTab, _font, HBORDER + lwidth, ypos,
|
||||||
fwidth, fontHeight);
|
fwidth, fontHeight);
|
||||||
|
|
Loading…
Reference in New Issue