summaryrefslogtreecommitdiff
path: root/src/gui/confirm_dialog.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'src/gui/confirm_dialog.cpp')
-rw-r--r--src/gui/confirm_dialog.cpp14
1 files changed, 3 insertions, 11 deletions
diff --git a/src/gui/confirm_dialog.cpp b/src/gui/confirm_dialog.cpp
index 969000f3..7caa4580 100644
--- a/src/gui/confirm_dialog.cpp
+++ b/src/gui/confirm_dialog.cpp
@@ -22,7 +22,6 @@
#include "gui/confirm_dialog.h"
#include "gui/widgets/button.h"
-#include "gui/widgets/scrollarea.h"
#include "gui/widgets/textbox.h"
#include "gui/gui.h"
@@ -38,17 +37,11 @@ ConfirmDialog::ConfirmDialog(const std::string &title, const std::string &msg,
mTextBox = new TextBox;
mTextBox->setEditable(false);
mTextBox->setOpaque(false);
+ mTextBox->setTextWrapped(msg, 260);
- mTextArea = new ScrollArea(mTextBox);
gcn::Button *yesButton = new Button(_("Yes"), "yes", this);
gcn::Button *noButton = new Button(_("No"), "no", this);
- mTextArea->setHorizontalScrollPolicy(gcn::ScrollArea::SHOW_NEVER);
- mTextArea->setVerticalScrollPolicy(gcn::ScrollArea::SHOW_NEVER);
- mTextArea->setOpaque(false);
-
- mTextBox->setTextWrapped(msg, 260);
-
const int numRows = mTextBox->getNumberOfRows();
const int inWidth = yesButton->getWidth() + noButton->getWidth() +
(2 * getPadding());
@@ -63,8 +56,7 @@ ConfirmDialog::ConfirmDialog(const std::string &title, const std::string &msg,
setContentSize(mTextBox->getMinWidth() + fontHeight, height + fontHeight +
noButton->getHeight());
- mTextArea->setDimension(gcn::Rectangle(4, 5, width + 2 * getPadding(),
- height + getPadding()));
+ mTextBox->setPosition(getPadding(), getPadding());
// 8 is the padding that GUIChan adds to button widgets
// (top and bottom combined)
@@ -72,7 +64,7 @@ ConfirmDialog::ConfirmDialog(const std::string &title, const std::string &msg,
noButton->setPosition(yesButton->getX() + inWidth - noButton->getWidth(),
height + 8);
- add(mTextArea);
+ add(mTextBox);
add(yesButton);
add(noButton);