Changeset 42909 in vbox for trunk/src/VBox/Frontends/VirtualBox/src/selector/graphics/chooser/UIGChooserItem.cpp
- Timestamp:
- Aug 21, 2012 3:46:56 PM (12 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/VBox/Frontends/VirtualBox/src/selector/graphics/chooser/UIGChooserItem.cpp
r42873 r42909 337 337 338 338 /* static */ 339 int UIGChooserItem::textWidth(const QFont &font, int iCount)339 int UIGChooserItem::textWidth(const QFont &font, QPaintDevice *pPaintDevice, int iCount) 340 340 { 341 341 /* Return text width: */ 342 QFontMetrics fm(font );342 QFontMetrics fm(font, pPaintDevice); 343 343 QString strString; 344 344 strString.fill('_', iCount); … … 347 347 348 348 /* static */ 349 QString UIGChooserItem::compressText(const QFont &font, Q String strText, int iWidth)349 QString UIGChooserItem::compressText(const QFont &font, QPaintDevice *pPaintDevice, QString strText, int iWidth) 350 350 { 351 351 /* Check if passed text is empty: */ … … 354 354 355 355 /* Check if passed text feats maximum width: */ 356 QFontMetrics fm(font );356 QFontMetrics fm(font, pPaintDevice); 357 357 if (fm.width(strText) <= iWidth) 358 358 return strText;
Note:
See TracChangeset
for help on using the changeset viewer.