summaryrefslogtreecommitdiff
path: root/src/gui
diff options
context:
space:
mode:
authorAndrei Karas <akaras@inbox.ru>2012-10-18 19:56:54 +0300
committerAndrei Karas <akaras@inbox.ru>2012-10-18 19:56:54 +0300
commitce455b0e3cd02b6796cab746addd1ff41a6b7ca8 (patch)
treef8e425c177ceb887184be3b00eea94c0168d519d /src/gui
parentc7ad8d093591214a32cacc79fa25d8e118493093 (diff)
downloadmanaverse-ce455b0e3cd02b6796cab746addd1ff41a6b7ca8.tar.gz
manaverse-ce455b0e3cd02b6796cab746addd1ff41a6b7ca8.tar.bz2
manaverse-ce455b0e3cd02b6796cab746addd1ff41a6b7ca8.tar.xz
manaverse-ce455b0e3cd02b6796cab746addd1ff41a6b7ca8.zip
Fix in ok dialog size and button position.
Diffstat (limited to 'src/gui')
-rw-r--r--src/gui/okdialog.cpp11
1 files changed, 5 insertions, 6 deletions
diff --git a/src/gui/okdialog.cpp b/src/gui/okdialog.cpp
index 5a2e39022..b06ba832c 100644
--- a/src/gui/okdialog.cpp
+++ b/src/gui/okdialog.cpp
@@ -59,14 +59,13 @@ OkDialog::OkDialog(const std::string &title, const std::string &msg,
if (width < okButton->getWidth())
width = okButton->getWidth();
- width = mTextBox->getWidth() + fontHeight;
- setContentSize(width, height + fontHeight + okButton->getHeight());
- mTextBox->setPosition(getPadding(), getPadding());
+ width = mTextBox->getWidth();
+ setContentSize(width, mTextBox->getHeight() + okButton->getHeight()
+ + getOption("buttonPadding", 8));
+ mTextBox->setPosition(0, 0);
- // 8 is the padding that GUIChan adds to button widgets
- // (top and bottom combined)
okButton->setPosition((width - okButton->getWidth()) / 2,
- height + getOption("buttonPadding", 8));
+ mTextBox->getHeight() + getOption("buttonPadding", 8));
add(mTextBox);
add(okButton);