From 129245a8063f09775930b0ffff11f043c219c277 Mon Sep 17 00:00:00 2001 From: Ira Rice Date: Wed, 28 Jan 2009 18:03:14 -0700 Subject: 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 --- src/gui/confirm_dialog.cpp | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) (limited to 'src/gui/confirm_dialog.cpp') 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); } -- cgit v1.2.3-60-g2f50