diff options
author | Andrei Karas <akaras@inbox.ru> | 2013-11-03 14:37:25 +0300 |
---|---|---|
committer | Andrei Karas <akaras@inbox.ru> | 2013-11-03 14:37:25 +0300 |
commit | c6961c03289205acee0faed8dc48fb7c7759005c (patch) | |
tree | 83fd127ad011be8b9affe17b7906f38bb4599b47 /src/gui | |
parent | 6d2a3ccb8914481212fb7bef1affb55848d5d672 (diff) | |
download | manaplus-c6961c03289205acee0faed8dc48fb7c7759005c.tar.gz manaplus-c6961c03289205acee0faed8dc48fb7c7759005c.tar.bz2 manaplus-c6961c03289205acee0faed8dc48fb7c7759005c.tar.xz manaplus-c6961c03289205acee0faed8dc48fb7c7759005c.zip |
fix editdialog theming.
Diffstat (limited to 'src/gui')
-rw-r--r-- | src/gui/windows/editdialog.cpp | 12 |
1 files changed, 7 insertions, 5 deletions
diff --git a/src/gui/windows/editdialog.cpp b/src/gui/windows/editdialog.cpp index f3c583d00..8c76fd6b3 100644 --- a/src/gui/windows/editdialog.cpp +++ b/src/gui/windows/editdialog.cpp @@ -51,13 +51,15 @@ void EditDialog::postInit() const int fontHeight = getFont()->getHeight(); const int height = numRows * fontHeight; const int pad = getPadding(); - - setContentSize(mDefaultWidth, height + fontHeight + okButton->getHeight()); + const int pad2 = pad * 2; mTextField->setPosition(pad, pad); - mTextField->setWidth(mDefaultWidth - 2 * pad); - + mTextField->setWidth(mDefaultWidth - pad2); + const int buttonPadding = getOption("buttonPadding", 8) + + mTextField->getHeight(); + setContentSize(mDefaultWidth, okButton->getHeight() + + buttonPadding + pad2); okButton->setPosition((mDefaultWidth - okButton->getWidth()) / 2, - height + getOption("buttonPadding", 8)); + buttonPadding + pad); add(mTextField); add(okButton); |