diff options
author | Andrei Karas <akaras@inbox.ru> | 2012-10-18 19:56:54 +0300 |
---|---|---|
committer | Andrei Karas <akaras@inbox.ru> | 2012-10-18 19:56:54 +0300 |
commit | ce455b0e3cd02b6796cab746addd1ff41a6b7ca8 (patch) | |
tree | f8e425c177ceb887184be3b00eea94c0168d519d /src | |
parent | c7ad8d093591214a32cacc79fa25d8e118493093 (diff) | |
download | plus-ce455b0e3cd02b6796cab746addd1ff41a6b7ca8.tar.gz plus-ce455b0e3cd02b6796cab746addd1ff41a6b7ca8.tar.bz2 plus-ce455b0e3cd02b6796cab746addd1ff41a6b7ca8.tar.xz plus-ce455b0e3cd02b6796cab746addd1ff41a6b7ca8.zip |
Fix in ok dialog size and button position.
Diffstat (limited to 'src')
-rw-r--r-- | src/gui/okdialog.cpp | 11 |
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); |