summaryrefslogtreecommitdiff
path: root/src/gui/confirm_dialog.cpp
diff options
context:
space:
mode:
authorIra Rice <irarice@gmail.com>2009-01-28 18:03:14 -0700
committerIra Rice <irarice@gmail.com>2009-01-28 18:03:14 -0700
commit129245a8063f09775930b0ffff11f043c219c277 (patch)
treee7a1486251f149cfd14c3eb290f4113107427bee /src/gui/confirm_dialog.cpp
parent4418d3678337276070e6d46d8011ce052be388a5 (diff)
downloadmana-client-129245a8063f09775930b0ffff11f043c219c277.tar.gz
mana-client-129245a8063f09775930b0ffff11f043c219c277.tar.bz2
mana-client-129245a8063f09775930b0ffff11f043c219c277.tar.xz
mana-client-129245a8063f09775930b0ffff11f043c219c277.zip
Consolidated setMinWidth into textWrap, since all lines are dependant
upon knowing what dimension they have to wrap to or beat in order for text wrapping to work. By adding this to be initiated at the same time as the text wrapping is done, this should decrease visual artifacts caused by not initializing it properly to begin with. Also made the item popups compact to the minimum dimension. Signed-off-by: Ira Rice <irarice@gmail.com>
Diffstat (limited to 'src/gui/confirm_dialog.cpp')
-rw-r--r--src/gui/confirm_dialog.cpp6
1 files changed, 3 insertions, 3 deletions
diff --git a/src/gui/confirm_dialog.cpp b/src/gui/confirm_dialog.cpp
index 569fd93f..643d5d7a 100644
--- a/src/gui/confirm_dialog.cpp
+++ b/src/gui/confirm_dialog.cpp
@@ -41,8 +41,7 @@ ConfirmDialog::ConfirmDialog(const std::string &title, const std::string &msg,
mTextArea->setVerticalScrollPolicy(gcn::ScrollArea::SHOW_NEVER);
mTextArea->setOpaque(false);
- mTextBox->setMinWidth(260);
- mTextBox->setTextWrapped(msg);
+ mTextBox->setTextWrapped(msg, 260);
int numRows = mTextBox->getNumberOfRows();
int width = getFont()->getWidth(title);
@@ -77,7 +76,8 @@ ConfirmDialog::ConfirmDialog(const std::string &title, const std::string &msg,
add(yesButton);
add(noButton);
- if (getParent()) {
+ if (getParent())
+ {
setLocationRelativeTo(getParent());
getParent()->moveToTop(this);
}