VirtualBox

Changeset 30878 in vbox


Ignore:
Timestamp:
Jul 16, 2010 12:44:00 PM (15 years ago)
Author:
vboxsync
Message:

FE/Qt4: max try count

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/VBox/Frontends/VirtualBox/src/selector/UIVMPreviewWindow.cpp

    r30868 r30878  
    159159         * our rectangle. Decrease the font pixel size as long as it
    160160         * doesn't fit. */
     161        int cMax = 30;
    161162        do
    162163        {
     
    165166            painter.setFont(font);
    166167            r = painter.boundingRect(m_vRect, fFlags, strName);
    167         }while (   r.height() > m_vRect.height()
    168                 || r.width() > m_vRect.width());
     168        }while ((   r.height() > m_vRect.height()
     169                 || r.width() > m_vRect.width())
     170                && cMax-- != 0);
    169171        painter.setPen(Qt::white);
    170172        painter.drawText(m_vRect, fFlags, strName);
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