- Timestamp:
- Aug 6, 2012 9:28:33 PM (12 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/VBox/Frontends/VirtualBox/src/selector/graphics/details/UIGDetailsElement.cpp
r42638 r42639 230 230 231 231 /* Calculate minimum text width: */ 232 int iMinimumFirstLineWidth = qMin(iMaximumFirstLineWidth, iMinimumTextColumnWidth);233 232 int iMinimumSecondLineWidth = qMin(iMaximumSecondLineWidth, iMinimumTextColumnWidth); 234 int iMinimumTextWidth = iM inimumFirstLineWidth + iSpacing + iMinimumSecondLineWidth;233 int iMinimumTextWidth = iMaximumFirstLineWidth + iSpacing + iMinimumSecondLineWidth; 235 234 236 235 /* Return result: */ … … 261 260 262 261 /* Calculate column widths: */ 263 int iFirstColumnWidth = 0; 264 int iSecondColumnWidth = 0; 265 if (iMaximumFirstLineWidth + iMaximumSecondLineWidth <= iMaximumTextWidth) 266 { 267 iFirstColumnWidth = iMaximumFirstLineWidth; 268 iSecondColumnWidth = iMaximumTextWidth - iFirstColumnWidth; 269 } 270 else 271 { 272 qreal dFirstRatio = (qreal)iMaximumFirstLineWidth / (iMaximumFirstLineWidth + iMaximumSecondLineWidth); 273 iFirstColumnWidth = iMaximumTextWidth * dFirstRatio; 274 iSecondColumnWidth = iMaximumTextWidth - iFirstColumnWidth; 275 } 262 int iFirstColumnWidth = iMaximumFirstLineWidth; 263 int iSecondColumnWidth = iMaximumTextWidth - iFirstColumnWidth; 276 264 277 265 /* For each the line: */ … … 306 294 return iSummaryTextHeight; 307 295 } 308 case ElementData_MinimumTextColumnWidth: return 1 50;296 case ElementData_MinimumTextColumnWidth: return 100; 309 297 /* Default: */ 310 298 default: break; … … 572 560 573 561 /* Calculate column widths: */ 574 int iFirstColumnWidth = 0; 575 int iSecondColumnWidth = 0; 576 if (iMaximumFirstLineWidth + iMaximumSecondLineWidth <= iMaximumTextWidth) 577 { 578 iFirstColumnWidth = iMaximumFirstLineWidth; 579 iSecondColumnWidth = iMaximumTextWidth - iFirstColumnWidth; 580 } 581 else 582 { 583 qreal dFirstRatio = (qreal)iMaximumFirstLineWidth / (iMaximumFirstLineWidth + iMaximumSecondLineWidth); 584 iFirstColumnWidth = iMaximumTextWidth * dFirstRatio; 585 iSecondColumnWidth = iMaximumTextWidth - iFirstColumnWidth; 586 } 562 int iFirstColumnWidth = iMaximumFirstLineWidth; 563 int iSecondColumnWidth = iMaximumTextWidth - iFirstColumnWidth; 587 564 588 565 /* Where to paint? */
Note:
See TracChangeset
for help on using the changeset viewer.