- Timestamp:
- Oct 4, 2018 4:19:03 PM (6 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/VBox/Frontends/VirtualBox/src/manager/chooser/UIChooserItemGroup.cpp
r74597 r74617 1468 1468 iProposedHeight += iChildrenSpacing; 1469 1469 } 1470 }1471 /* Minus last spacing: */1472 iProposedHeight -= iChildrenSpacing;1470 /* Minus last spacing: */ 1471 iProposedHeight -= iChildrenSpacing; 1472 } 1473 1473 1474 1474 /* Finally, additional height during animation: */ … … 1668 1668 /* Calculate top rectangle: */ 1669 1669 QRect tRect = rect; 1670 tRect.setBottom(tRect.top() + iFullHeaderHeight); 1670 if (!m_fClosed) 1671 tRect.setBottom(tRect.top() + iFullHeaderHeight - 1); 1672 1671 1673 /* Prepare top gradient: */ 1672 1674 QLinearGradient tGradient(tRect.bottomLeft(), tRect.topLeft()); 1673 1675 tGradient.setColorAt(1, headerColor.darker(animatedValue())); 1674 1676 tGradient.setColorAt(0, headerColor.darker(headerDarkness())); 1677 1675 1678 /* Fill top rectangle: */ 1676 1679 pPainter->fillRect(tRect, tGradient); … … 1712 1715 pPainter->save(); 1713 1716 1717 /* Prepare variables: */ 1718 const int iMargin = data(GroupItemData_VerticalMargin).toInt(); 1719 const int iFullHeaderHeight = 2 * iMargin + m_minimumHeaderSize.height(); 1720 1714 1721 /* Prepare color: */ 1715 QPalette pal = palette();1716 QColor strokeColor;1717 1718 strokeColor = pal.color(QPalette::Active, QPalette::Mid).lighter(155);1722 const QPalette pal = palette(); 1723 const QColor strokeColor = pal.color(QPalette::Active, 1724 model()->currentItems().contains(this) ? 1725 QPalette::Highlight : QPalette::Midlight).darker(headerDarkness() + 10); 1719 1726 1720 1727 /* Create/assign pen: */ … … 1723 1730 pPainter->setPen(pen); 1724 1731 1732 /* Calculate top rectangle: */ 1733 QRect tRect = rect; 1734 if (!m_fClosed) 1735 tRect.setBottom(tRect.top() + iFullHeaderHeight - 1); 1736 1725 1737 /* Draw borders: */ 1726 pPainter->drawLine( rect.topLeft(), rect.topRight()+ QPoint(1, 0));1727 pPainter->drawLine( rect.bottomLeft(), rect.bottomRight() + QPoint(1, 0));1728 pPainter->drawLine( rect.topLeft(), rect.bottomLeft());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()); 1729 1741 1730 1742 /* Restore painter: */
Note:
See TracChangeset
for help on using the changeset viewer.