Changeset 108128 in vbox for trunk/src/VBox/Frontends/VirtualBox/src/manager/tools/UIToolsItem.cpp
- Timestamp:
- Feb 9, 2025 7:49:08 PM (12 days ago)
- svn:sync-xref-src-repo-rev:
- 167427
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/VBox/Frontends/VirtualBox/src/manager/tools/UIToolsItem.cpp
r108127 r108128 924 924 model()->paintDevice(), 925 925 /* Text to paint: */ 926 m_strName); 926 m_strName, 927 /* Text for popup mode? */ 928 model()->tools()->isPopup()); 927 929 } 928 930 } … … 939 941 void UIToolsItem::paintText(QPainter *pPainter, QPoint point, 940 942 const QFont &font, QPaintDevice *pPaintDevice, 941 const QString &strText) 943 const QString &strText, 944 bool fPopup) 942 945 { 943 946 /* Save painter: */ … … 952 955 953 956 /* Draw text: */ 954 pPainter->drawText(point, strText); 957 if (fPopup) 958 pPainter->drawText(point, strText); 959 else 960 { 961 QPainterPath textPath; 962 textPath.addText(0, 0, font, strText); 963 textPath.translate(point); 964 pPainter->setRenderHints(QPainter::Antialiasing | QPainter::TextAntialiasing); 965 pPainter->setPen(QPen(uiCommon().isInDarkMode() ? Qt::black : Qt::white, 2, Qt::SolidLine, Qt::RoundCap)); 966 pPainter->drawPath(QPainterPathStroker().createStroke(textPath)); 967 pPainter->setBrush(uiCommon().isInDarkMode() ? Qt::white: Qt::black); 968 pPainter->setPen(Qt::NoPen); 969 pPainter->drawPath(textPath); 970 } 955 971 956 972 /* Restore painter: */
Note:
See TracChangeset
for help on using the changeset viewer.