- Timestamp:
- Feb 25, 2009 1:02:54 PM (16 years ago)
- Location:
- trunk/src/VBox/Frontends/VirtualBox/src
- Files:
-
- 2 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/VBox/Frontends/VirtualBox/src/QIMessageBox.cpp
r17108 r17125 217 217 /* Now resize window to minimum possible size */ 218 218 window()->resize (window()->minimumSizeHint()); 219 220 /* Check if we have to make dialog fixed in height */ 221 bool makeFixedHeight = true; 222 foreach (QIArrowButton *button, mButtonsList) 223 { 224 if (button->isExpanded()) 225 { 226 makeFixedHeight = false; 227 break; 228 } 229 } 230 if (makeFixedHeight) 231 window()->setMaximumHeight (window()->minimumSizeHint().height()); 232 else 233 window()->setMaximumHeight (QWIDGETSIZE_MAX); 219 234 } 220 235 … … 345 360 mDetailsText = new QTextEdit(); 346 361 { 347 /* calculate the minimum size dynamically, approx. for 40 chars and348 * 6 lines */362 /* Calculate the minimum size dynamically, approx. 363 * for 40 chars, 4 lines & 2 <table> margins */ 349 364 QFontMetrics fm = mDetailsText->fontMetrics(); 350 mDetailsText->setMinimumSize (40 * fm.width ('m'), fm.lineSpacing() * 6); 365 mDetailsText->setMinimumSize (fm.width ('m') * 40, 366 fm.lineSpacing() * 4 + 4 * 2); 351 367 } 352 368 mDetailsText->setReadOnly (true); … … 513 529 void QIMessageBox::setDetailsText (const QString &aText) 514 530 { 515 mDetailsText->setText (aText); 531 QStringList parts (aText.split ("<!--EOM-->")); 532 mTextLabel->setText (mTextLabel->text() + parts [0]); 533 mDetailsText->setText (parts [1]); 516 534 } 517 535 -
trunk/src/VBox/Frontends/VirtualBox/src/VBoxProblemReporter.cpp
r17084 r17125 2316 2316 HRESULT aWrapperRC /* = S_OK */) 2317 2317 { 2318 /* Compose complex details string with internal <!--EOM--> delimiter to 2319 * make it possible to split string into info & details parts which will 2320 * be used separately in QIMessageBox */ 2318 2321 QString formatted; 2319 2322 2320 2323 if (!aInfo.text().isEmpty()) 2321 formatted += QString ("<table bgcolor=#FFFFFF border=0 cellspacing=0 " 2322 "cellpadding=0 width=100%>" 2323 "<tr><td><p>%1.</p></td></tr>" 2324 "</table><p></p>") 2325 .arg (VBoxGlobal::highlight (aInfo.text())); 2324 formatted += QString ("<p>%1</p><!--EOM-->").arg (aInfo.text()); 2326 2325 2327 2326 formatted += "<table bgcolor=#EEEEEE border=0 cellspacing=0 "
Note:
See TracChangeset
for help on using the changeset viewer.