VirtualBox

Ignore:
Timestamp:
Aug 21, 2012 3:46:56 PM (12 years ago)
Author:
vboxsync
Message:

FE/Qt: 6234: Support for VM groups: Support for Vista/Win7 DPI font scaling.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/VBox/Frontends/VirtualBox/src/selector/graphics/chooser/UIGChooserItem.cpp

    r42873 r42909  
    337337
    338338/* static */
    339 int UIGChooserItem::textWidth(const QFont &font, int iCount)
     339int UIGChooserItem::textWidth(const QFont &font, QPaintDevice *pPaintDevice, int iCount)
    340340{
    341341    /* Return text width: */
    342     QFontMetrics fm(font);
     342    QFontMetrics fm(font, pPaintDevice);
    343343    QString strString;
    344344    strString.fill('_', iCount);
     
    347347
    348348/* static */
    349 QString UIGChooserItem::compressText(const QFont &font, QString strText, int iWidth)
     349QString UIGChooserItem::compressText(const QFont &font, QPaintDevice *pPaintDevice, QString strText, int iWidth)
    350350{
    351351    /* Check if passed text is empty: */
     
    354354
    355355    /* Check if passed text feats maximum width: */
    356     QFontMetrics fm(font);
     356    QFontMetrics fm(font, pPaintDevice);
    357357    if (fm.width(strText) <= iWidth)
    358358        return strText;
Note: See TracChangeset for help on using the changeset viewer.

© 2024 Oracle Support Privacy / Do Not Sell My Info Terms of Use Trademark Policy Automated Access Etiquette