summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
Diffstat (limited to 'src')
-rw-r--r--src/gui/windows/editdialog.cpp12
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);