Changeset 9259 in vbox for trunk/src/VBox
- Timestamp:
- May 30, 2008 3:52:31 PM (17 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/VBox/Frontends/VirtualBox4/src/darwin/VBoxUtils-darwin.cpp
r9245 r9259 103 103 QFontMetrics fm (qApp->font()); 104 104 QRect tbRect = fm.boundingRect (aText); 105 const int h = qMax (aPixmap.height(), tbRect.height());105 const int h = qMax (aPixmap.height(), fm.ascent() + 1); 106 106 const int m = 2; 107 107 QPixmap dragPixmap (aPixmap.width() + tbRect.width() + m, h); … … 109 109 QPainter painter (&dragPixmap); 110 110 painter.drawPixmap (0, qAbs (h - aPixmap.height()) / 2.0, aPixmap); 111 painter.drawText (aPixmap.width() + m, qAbs (h - aPixmap.height()) / 2.0 + aPixmap.height(), aText); 111 painter.setPen (Qt::white); 112 painter.drawText (QRect (aPixmap.width() + m, 1, tbRect.width(), h - 1), Qt::AlignLeft | Qt::AlignVCenter, aText); 113 painter.setPen (Qt::black); 114 painter.drawText (QRect (aPixmap.width() + m, 0, tbRect.width(), h - 1), Qt::AlignLeft | Qt::AlignVCenter, aText); 112 115 painter.end(); 113 116 return dragPixmap;
Note:
See TracChangeset
for help on using the changeset viewer.