VirtualBox

Changeset 51956 in vbox for trunk/src/VBox/Frontends


Ignore:
Timestamp:
Jul 9, 2014 2:32:38 PM (11 years ago)
Author:
vboxsync
Message:

FE/Qt: Runtime UI: Mini tool-bar: Make sure tool-bar position is updated properly on host/guest geometry changes.

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

Legend:

Unmodified
Added
Removed
  • trunk/src/VBox/Frontends/VirtualBox/src/globals/UIAnimationFramework.cpp

    r48534 r51956  
    2626/* GUI includes: */
    2727#include "UIAnimationFramework.h"
     28
     29/* Other VBox includes: */
     30#include "iprt/assert.h"
    2831
    2932/* static */
     
    6972void UIAnimation::prepare()
    7073{
     74    /* Make sure parent asigned: */
     75    AssertPtrReturnVoid(parent());
     76
    7177    /* Prepare animation-machine: */
    7278    m_pAnimationMachine = new QStateMachine(this);
    7379    /* Create 'start' state: */
    7480    m_pStateStart = new QState(m_pAnimationMachine);
     81    m_pStateStart->assignProperty(parent(), "AnimationState", QString("Start"));
    7582    connect(m_pStateStart, SIGNAL(propertiesAssigned()), this, SIGNAL(sigStateEnteredStart()));
    7683    /* Create 'final' state: */
    7784    m_pStateFinal = new QState(m_pAnimationMachine);
     85    m_pStateFinal->assignProperty(parent(), "AnimationState", QString("Final"));
    7886    connect(m_pStateFinal, SIGNAL(propertiesAssigned()), this, SIGNAL(sigStateEnteredFinal()));
    7987
  • trunk/src/VBox/Frontends/VirtualBox/src/widgets/UIMiniToolBar.cpp

    r51654 r51956  
    191191    updateAutoHideAnimationBounds();
    192192
     193    /* Update toolbar geometry if necessary: */
     194    const QString strAnimationState = property("AnimationState").toString();
     195    if (strAnimationState == "Start")
     196        m_pEmbeddedToolbar->move(m_hiddenToolbarPosition);
     197    else if (strAnimationState == "Final")
     198        m_pEmbeddedToolbar->move(m_shownToolbarPosition);
     199
    193200    /* Simulate toolbar auto-hiding: */
    194201    simulateToolbarAutoHiding();
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