VirtualBox

Ignore:
Timestamp:
Jan 28, 2019 6:14:00 PM (6 years ago)
Author:
vboxsync
svn:sync-xref-src-repo-rev:
128453
Message:

FE/Qt: bugref:9241: VirtualBox Manager UI: Chooser pane: More wise layout fix for group enter/exit animation (replacing r128286).

Location:
trunk/src/VBox/Frontends/VirtualBox/src/manager/chooser
Files:
4 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/VBox/Frontends/VirtualBox/src/manager/chooser/UIChooserItemGlobal.cpp

    r76942 r77026  
    6767
    6868UIChooserItemGlobal::UIChooserItemGlobal(UIChooserItem *pParent,
    69                                          UIChooserItemGlobal * ,
     69                                         UIChooserItemGlobal *pCopyFrom,
    7070                                         int iPosition /* = -1 */)
    7171    : UIChooserItem(pParent, pParent->isTemporary(), 0, 100)
     
    7878    , m_iMinimumNameWidth(0)
    7979    , m_iMaximumNameWidth(0)
     80    , m_iHeightHint(pCopyFrom->heightHint())
    8081{
    8182    /* Prepare: */
     
    149150    updateGeometry();
    150151    model()->updateLayout();
     152}
     153
     154int UIChooserItemGlobal::heightHint() const
     155{
     156    return m_iHeightHint;
    151157}
    152158
  • trunk/src/VBox/Frontends/VirtualBox/src/manager/chooser/UIChooserItemGlobal.h

    r76581 r77026  
    5959        /** Defines height @a iHint. */
    6060        void setHeightHint(int iHint);
     61        /** Returns height hint. */
     62        int heightHint() const;
    6163    /** @} */
    6264
  • trunk/src/VBox/Frontends/VirtualBox/src/manager/chooser/UIChooserModel.cpp

    r76920 r77026  
    7979    , m_fIsScrollingInProgress(false)
    8080    , m_pLookupTimer(0)
    81     , m_iGlobalItemHeightHint(-1)
    8281{
    8382    /* Prepare: */
     
    472471    m_pLeftRoot->setPos(0, 0);
    473472    m_pLeftRoot->resize(root()->geometry().size());
    474     if (fLeftRootIsMain)
    475     {
    476         foreach (UIChooserItem *pItem, m_pLeftRoot->items(UIChooserItemType_Global))
    477             pItem->toGlobalItem()->setHeightHint(m_iGlobalItemHeightHint);
    478     }
    479473
    480474    /* Create right root: */
     
    513507    m_pLeftRoot->setPos(- root()->geometry().width(), 0);
    514508    m_pLeftRoot->resize(root()->geometry().size());
    515     if (fLeftRootIsMain)
    516     {
    517         foreach (UIChooserItem *pItem, m_pLeftRoot->items(UIChooserItemType_Global))
    518             pItem->toGlobalItem()->setHeightHint(m_iGlobalItemHeightHint);
    519     }
    520509
    521510    /* Create right root: */
     
    685674void UIChooserModel::setGlobalItemHeightHint(int iHint)
    686675{
    687     /* Remember new hint: */
    688     m_iGlobalItemHeightHint = iHint;
    689 
    690676    /* Walk thrugh all the items of navigation list: */
    691677    foreach (UIChooserItem *pItem, navigationList())
     
    697683            UIChooserItemGlobal *pGlobalItem = pItem->toGlobalItem();
    698684            if (pGlobalItem)
    699                 pGlobalItem->setHeightHint(m_iGlobalItemHeightHint);
     685                pGlobalItem->setHeightHint(iHint);
    700686        }
    701687    }
  • trunk/src/VBox/Frontends/VirtualBox/src/manager/chooser/UIChooserModel.h

    r76915 r77026  
    523523        /** Holds the Id of last VM created from the GUI side. */
    524524        QUuid  m_uLastCreatedMachineId;
    525 
    526         /** Holds the global item height hint. */
    527         int  m_iGlobalItemHeightHint;
    528525    /** @} */
    529526
Note: See TracChangeset for help on using the changeset viewer.

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