summaryrefslogtreecommitdiff
path: root/src/gui/windows/confirmdialog.cpp
diff options
context:
space:
mode:
authorAndrei Karas <akaras@inbox.ru>2016-04-07 17:12:59 +0300
committerAndrei Karas <akaras@inbox.ru>2016-04-07 17:12:59 +0300
commit2538267ce30c5cfe3bbf23442e7c3a80e647f260 (patch)
tree5490d8aa2931645af09e35cee0e6b255592103a9 /src/gui/windows/confirmdialog.cpp
parent7807ed17587b09c39dcd815a554f48e2f6ecb346 (diff)
downloadplus-2538267ce30c5cfe3bbf23442e7c3a80e647f260.tar.gz
plus-2538267ce30c5cfe3bbf23442e7c3a80e647f260.tar.bz2
plus-2538267ce30c5cfe3bbf23442e7c3a80e647f260.tar.xz
plus-2538267ce30c5cfe3bbf23442e7c3a80e647f260.zip
For commands in links in chat ask before executing command.
Diffstat (limited to 'src/gui/windows/confirmdialog.cpp')
-rw-r--r--src/gui/windows/confirmdialog.cpp11
1 files changed, 7 insertions, 4 deletions
diff --git a/src/gui/windows/confirmdialog.cpp b/src/gui/windows/confirmdialog.cpp
index 62636fc16..e08177ef4 100644
--- a/src/gui/windows/confirmdialog.cpp
+++ b/src/gui/windows/confirmdialog.cpp
@@ -77,12 +77,15 @@ void ConfirmDialog::postInit()
if (width < inWidth)
width = inWidth;
- setContentSize(mTextBox->getMinWidth() + fontHeight, height + fontHeight +
- noButton->getHeight());
+ int windowWidth = width;
+ if (windowWidth < mTextBox->getMinWidth() + fontHeight)
+ {
+ windowWidth = mTextBox->getMinWidth() + fontHeight;
+ }
+ setContentSize(windowWidth,
+ height + fontHeight + noButton->getHeight());
mTextBox->setPosition(mPadding, mPadding);
- // 8 is the padding that GUIChan adds to button widgets
- // (top and bottom combined)
const int buttonPadding = getOption("buttonPadding", 8);
yesButton->setPosition((width - inWidth) / 2, height + buttonPadding);
noButton->setPosition(yesButton->getX() + yesButton->getWidth()