VirtualBox

Changeset 77829 in vbox


Ignore:
Timestamp:
Mar 21, 2019 3:55:55 PM (6 years ago)
Author:
vboxsync
Message:

FE/Qt: bugref:9241: VirtualBox Manager: Chooser pane: Fixing layout hint update regression indirectly introduced in r129266.

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

Legend:

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

    r77827 r77829  
    231231    , m_iAnimatedValue(m_iDefaultValue)
    232232    , m_pDisabledEffect(0)
    233     , m_iPreviousMinimumWidthHint(0)
    234233    , m_enmDragTokenPlace(UIChooserItemDragToken_Off)
    235234    , m_iDragTokenDarkness(110)
     
    423422    if (parentItem())
    424423        parentItem()->updateGeometry();
    425 
    426     /* Special handling for root-items: */
    427     if (isRoot())
    428     {
    429         /* Root-item should notify chooser-view if minimum-width-hint was changed: */
    430         const int iMinimumWidthHint = minimumWidthHint();
    431         if (m_iPreviousMinimumWidthHint != iMinimumWidthHint)
    432         {
    433             /* Save new minimum-width-hint, notify listener: */
    434             m_iPreviousMinimumWidthHint = iMinimumWidthHint;
    435             emit sigMinimumWidthHintChanged(m_iPreviousMinimumWidthHint);
    436         }
    437     }
    438424}
    439425
  • trunk/src/VBox/Frontends/VirtualBox/src/manager/chooser/UIChooserItem.h

    r77827 r77829  
    8181        /** Notifies listeners about hover leave. */
    8282        void sigHoverLeave();
    83     /** @} */
    84 
    85     /** @name Layout stuff.
    86       * @{ */
    87         /** Notifies listeners about @a iMinimumWidthHint change. */
    88         void sigMinimumWidthHintChanged(int iMinimumWidthHint);
    8983    /** @} */
    9084
     
    341335        /** Holds previous geometry. */
    342336        QRectF  m_previousGeometry;
    343 
    344         /** Holds previous minimum width hint. */
    345         int  m_iPreviousMinimumWidthHint;
    346337    /** @} */
    347338
  • trunk/src/VBox/Frontends/VirtualBox/src/manager/chooser/UIChooserItemGroup.cpp

    r77827 r77829  
    6161    , m_pLayoutGroup(0)
    6262    , m_pLayoutMachine(0)
     63    , m_iPreviousMinimumWidthHint(0)
    6364{
    6465    prepare();
     
    8283    , m_pLayoutGroup(0)
    8384    , m_pLayoutMachine(0)
     85    , m_iPreviousMinimumWidthHint(0)
    8486{
    8587    prepare();
     
    568570    /* Call to base-class: */
    569571    UIChooserItem::updateGeometry();
     572
     573    /* Special handling for root-groups: */
     574    if (isRoot())
     575    {
     576        /* Root-group should notify chooser-view if minimum-width-hint was changed: */
     577        const int iMinimumWidthHint = minimumWidthHint();
     578        if (m_iPreviousMinimumWidthHint != iMinimumWidthHint)
     579        {
     580            /* Save new minimum-width-hint, notify listener: */
     581            m_iPreviousMinimumWidthHint = iMinimumWidthHint;
     582            emit sigMinimumWidthHintChanged(m_iPreviousMinimumWidthHint);
     583        }
     584    }
    570585}
    571586
     
    11881203                this, &UIChooserItemGroup::sltHandleWindowRemapped);
    11891204    }
     1205
     1206    /* Invalidate minimum width hint
     1207     * after we isntalled listener: */
     1208    m_iPreviousMinimumWidthHint = 0;
     1209    /* Update geometry finally: */
     1210    updateGeometry();
    11901211}
    11911212
  • trunk/src/VBox/Frontends/VirtualBox/src/manager/chooser/UIChooserItemGroup.h

    r77826 r77829  
    5151    /** @} */
    5252
     53    /** @name Layout stuff.
     54      * @{ */
     55        /** Notifies listeners about @a iMinimumWidthHint change. */
     56        void sigMinimumWidthHintChanged(int iMinimumWidthHint);
     57    /** @} */
     58
    5359public:
    5460
     
    363369    /** @name Layout stuff.
    364370      * @{ */
     371        /** Holds previous minimum width hint. */
     372        int  m_iPreviousMinimumWidthHint;
     373
    365374        /** Holds cached visible name size. */
    366375        QSize  m_visibleNameSize;
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