Changeset 43991 in vbox
- Timestamp:
- Nov 28, 2012 5:06:38 PM (12 years ago)
- svn:sync-xref-src-repo-rev:
- 82370
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/VBox/Frontends/VirtualBox/src/selector/graphics/details/UIGDetailsSet.cpp
r43989 r43991 390 390 case DetailsElementType_General: 391 391 case DetailsElementType_System: 392 {393 UIGDetailsElement *pPreviewElement = element(DetailsElementType_Preview);394 int iPreviewWidth = pPreviewElement && pPreviewElement->isVisible() ? pPreviewElement->minimumWidthHint() : 0;395 int iWidth = iPreviewWidth == 0 ? iMaximumWidth - 2 * iMargin :396 iMaximumWidth - 2 * iMargin - iSpacing - iPreviewWidth;397 pElement->setPos(iMargin, iVerticalIndent);398 /* Resize to required width: */399 int iHeight = pElement->minimumHeightHint();400 pElement->resize(iWidth, iHeight);401 /* Update minimum height hint: */402 pElement->updateMinimumTextHeight();403 pItem->updateSizeHint();404 /* Resize to required height: */405 iHeight = pElement->minimumHeightHint();406 pElement->resize(iWidth, iHeight);407 pItem->updateLayout();408 iVerticalIndent += (iHeight + iSpacing);409 break;410 }411 case DetailsElementType_Preview:412 {413 int iWidth = pElement->minimumWidthHint();414 int iHeight = pElement->minimumHeightHint();415 pElement->setPos(iMaximumWidth - iMargin - iWidth, iMargin);416 pElement->resize(iWidth, iHeight);417 pItem->updateLayout();418 iVerticalIndent = qMax(iVerticalIndent, iHeight + iSpacing);419 break;420 }421 392 case DetailsElementType_Display: 422 393 case DetailsElementType_Storage: … … 431 402 case DetailsElementType_Description: 432 403 { 404 /* Move element: */ 405 pElement->setPos(iMargin, iVerticalIndent); 406 /* Resize element to required width: */ 433 407 int iWidth = iMaximumWidth - 2 * iMargin; 434 pElement->setPos(iMargin, iVerticalIndent); 435 /* Resize to required width: */ 408 if (pElement->elementType() == DetailsElementType_General || 409 pElement->elementType() == DetailsElementType_System) 410 if (UIGDetailsElement *pPreviewElement = element(DetailsElementType_Preview)) 411 if (pPreviewElement->isVisible()) 412 iWidth -= (iSpacing + pPreviewElement->minimumWidthHint()); 436 413 int iHeight = pElement->minimumHeightHint(); 437 414 pElement->resize(iWidth, iHeight); 438 /* Update minimum height hint: */ 415 /* Update minimum-height-hint: */ 416 pElement->updateMinimumTextHeight(); 439 417 pItem->updateSizeHint(); 440 /* Resize to required height: */418 /* Resize element to required height: */ 441 419 iHeight = pElement->minimumHeightHint(); 442 420 pElement->resize(iWidth, iHeight); 421 /* Layout element content: */ 443 422 pItem->updateLayout(); 423 /* Advance indent: */ 444 424 iVerticalIndent += (iHeight + iSpacing); 425 break; 426 } 427 case DetailsElementType_Preview: 428 { 429 /* Prepare variables: */ 430 int iWidth = pElement->minimumWidthHint(); 431 int iHeight = pElement->minimumHeightHint(); 432 /* Move element: */ 433 pElement->setPos(iMaximumWidth - iMargin - iWidth, iMargin); 434 /* Resize element: */ 435 pElement->resize(iWidth, iHeight); 436 /* Layout element content: */ 437 pItem->updateLayout(); 438 /* Advance indent: */ 439 iVerticalIndent = qMax(iVerticalIndent, iHeight + iSpacing); 445 440 break; 446 441 }
Note:
See TracChangeset
for help on using the changeset viewer.