VirtualBox

Changeset 20757 in vbox


Ignore:
Timestamp:
Jun 22, 2009 10:02:23 AM (16 years ago)
Author:
vboxsync
Message:

FE/Qt4: 3948: Mini-ToolBar for Full-screen & Seamless modes: Fixed bug when toolbar geometry was not updated if snapshot is taken (e.g. toolbar's label changed).

Location:
trunk/src/VBox/Frontends/VirtualBox
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/VBox/Frontends/VirtualBox/include/VBoxMiniToolBar.h

    r20441 r20757  
    7979private:
    8080
     81    void initialize();
    8182    void recreateMask();
    8283    void moveToBase();
  • trunk/src/VBox/Frontends/VirtualBox/src/VBoxMiniToolBar.cpp

    r20441 r20757  
    133133void VBoxMiniToolBar::setDisplayText (const QString &aText)
    134134{
    135     mDisplayLabel->setText (aText);
     135    if (mDisplayLabel->text() != aText)
     136    {
     137        /* Update toolbar label */
     138        mDisplayLabel->setText (aText);
     139
     140        /* Reinitialize */
     141        initialize();
     142
     143        if (!isHidden())
     144            updateDisplay (!mAutoHide, false);
     145    }
    136146}
    137147
     
    287297            lableMargin->setMinimumWidth (15);
    288298
    289         /* Resize to sizehint */
    290         resize (sizeHint());
    291 
    292299        /* Initialize */
    293         recreateMask();
    294         moveToBase();
     300        initialize();
    295301
    296302        mPolished = true;
     
    311317    mAutoHide = !aOn;
    312318    updateDisplay (!mAutoHide, false);
     319}
     320
     321void VBoxMiniToolBar::initialize()
     322{
     323    /* Resize to sizehint */
     324    resize (sizeHint());
     325
     326    /* Update geometry */
     327    recreateMask();
     328    moveToBase();
    313329}
    314330
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