diff options
Diffstat (limited to 'gui/PopUpWidget.cpp')
-rw-r--r-- | gui/PopUpWidget.cpp | 7 |
1 files changed, 5 insertions, 2 deletions
diff --git a/gui/PopUpWidget.cpp b/gui/PopUpWidget.cpp index ca87c8d9df..acdc0feae6 100644 --- a/gui/PopUpWidget.cpp +++ b/gui/PopUpWidget.cpp @@ -252,8 +252,8 @@ void PopUpDialog::drawMenuEntry(int entry, bool hilite) { g_gui.fillRect(x, y, w, kLineHeight, hilite ? g_gui._textcolorhi : g_gui._bgcolor); if (name.size() == 0) { // Draw a seperator - g_gui.hLine(x, y + kLineHeight / 2, x + w - 1, g_gui._color); - g_gui.hLine(x + 1, y + 1 + kLineHeight / 2, x + w - 1, g_gui._shadowcolor); + g_gui.hLine(x - 1, y + kLineHeight / 2, x + w, g_gui._shadowcolor); + g_gui.hLine(x, y + 1 + kLineHeight / 2, x + w, g_gui._color); } else { g_gui.drawString(name, x + 1, y + 2, w - 2, hilite ? g_gui._bgcolor : g_gui._textcolor); } @@ -273,6 +273,9 @@ PopUpWidget::PopUpWidget(GuiObject *boss, int x, int y, int w, int h, const Stri _type = kPopUpWidget; _selectedItem = -1; + + if (!_label.isEmpty() && _labelWidth == 0) + _labelWidth = g_gui.getStringWidth(_label); } void PopUpWidget::handleMouseDown(int x, int y, int button, int clickCount) { |