- Timestamp:
- Oct 9, 2018 1:44:30 PM (6 years ago)
- Location:
- trunk/src/VBox/Frontends/VirtualBox/src/manager/chooser
- Files:
-
- 2 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/VBox/Frontends/VirtualBox/src/manager/chooser/UIChooserItemGroup.cpp
r74617 r74717 349 349 void UIChooserItemGroup::paint(QPainter *pPainter, const QStyleOptionGraphicsItem *pOptions, QWidget* /* pWidget = 0 */) 350 350 { 351 /* Acquire rectangle: */ 352 const QRect rectangle = pOptions->rect; 353 351 354 /* Paint background: */ 352 paintBackground(pPainter, pOptions->rect);355 paintBackground(pPainter, rectangle); 353 356 /* Paint frame: */ 354 paintFrame Rectangle(pPainter, pOptions->rect);357 paintFrame(pPainter, rectangle); 355 358 /* Paint header: */ 356 paintHeader(pPainter, pOptions->rect);359 paintHeader(pPainter, rectangle); 357 360 } 358 361 … … 859 862 pItem->updateLayout(); 860 863 /* Advance indent for next items: */ 861 iPreviousVerticalIndent += iMinimumHeight; 862 if (pItem->type() != UIChooserItemType_Global) 863 iPreviousVerticalIndent += iChildrenSpacing; 864 iPreviousVerticalIndent += (iMinimumHeight + iChildrenSpacing); 864 865 } 865 866 } … … 1464 1465 foreach (UIChooserItem *pItem, items()) 1465 1466 { 1466 iProposedHeight += pItem->minimumHeightHint(); 1467 if (pItem->type() != UIChooserItemType_Global) 1468 iProposedHeight += iChildrenSpacing; 1467 iProposedHeight += (pItem->minimumHeightHint() + iChildrenSpacing); 1469 1468 } 1470 1469 /* Minus last spacing: */ … … 1706 1705 } 1707 1706 1708 void UIChooserItemGroup::paintFrame Rectangle(QPainter *pPainter, const QRect &rect)1707 void UIChooserItemGroup::paintFrame(QPainter *pPainter, const QRect &rectangle) 1709 1708 { 1710 1709 /* Not for roots: */ … … 1731 1730 1732 1731 /* Calculate top rectangle: */ 1733 QRect t Rect = rect;1732 QRect topRect = rectangle; 1734 1733 if (!m_fClosed) 1735 t Rect.setBottom(tRect.top() + iFullHeaderHeight - 1);1734 topRect.setBottom(topRect.top() + iFullHeaderHeight - 1); 1736 1735 1737 1736 /* Draw borders: */ 1738 pPainter->drawLine(tRect.topLeft(), tRect.topRight() + QPoint(1, 0)); 1739 pPainter->drawLine(tRect.bottomLeft(), tRect.bottomRight() + QPoint(1, 0)); 1740 pPainter->drawLine(tRect.topLeft(), tRect.bottomLeft()); 1737 pPainter->drawLine(topRect.bottomLeft(), topRect.bottomRight() + QPoint(1, 0)); 1738 pPainter->drawLine(topRect.topLeft(), topRect.bottomLeft()); 1741 1739 1742 1740 /* Restore painter: */ -
trunk/src/VBox/Frontends/VirtualBox/src/manager/chooser/UIChooserItemGroup.h
r74393 r74717 311 311 void paintBackground(QPainter *pPainter, const QRect &rect); 312 312 /** Paints frame rectangle using specified @a pPainter and certain @a rect. */ 313 void paintFrame Rectangle(QPainter *pPainter, const QRect &rect);313 void paintFrame(QPainter *pPainter, const QRect &rect); 314 314 /** Paints header using specified @a pPainter and certain @a rect. */ 315 315 void paintHeader(QPainter *pPainter, const QRect &rect);
Note:
See TracChangeset
for help on using the changeset viewer.