VirtualBox

Changeset 76935 in vbox


Ignore:
Timestamp:
Jan 22, 2019 12:18:08 PM (6 years ago)
Author:
vboxsync
Message:

FE/Qt: bugref:9241: VirtualBox Manager UI: Few layout fixes for Chooser pane: Take into account tool button width only when it's visible.

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

Legend:

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

    r76933 r76935  
    620620    connect(gpManager, &UIVirtualBoxManager::sigWindowRemapped,
    621621            this, &UIChooserItemMachine::sltHandleWindowRemapped);
     622    connect(model(), &UIChooserModel::sigSelectionChanged,
     623            this, &UIChooserItemMachine::sltUpdateFirstRowMaximumWidth);
     624    connect(this, &UIChooserItemMachine::sigHoverEnter,
     625            this, &UIChooserItemMachine::sltUpdateFirstRowMaximumWidth);
     626    connect(this, &UIChooserItemMachine::sigHoverLeave,
     627            this, &UIChooserItemMachine::sltUpdateFirstRowMaximumWidth);
    622628
    623629    /* Init: */
     
    772778    iFirstRowMaximumWidth -= m_pixmapSize.width(); /* left pixmap width */
    773779    iFirstRowMaximumWidth -= iMajorSpacing; /* spacing between left pixmap and name(s) */
    774     iFirstRowMaximumWidth -= iMajorSpacing; /* spacing between name(s) and right pixmap */
    775     iFirstRowMaximumWidth -= m_toolsPixmapSize.width() + 2 * iButtonMargin; /* right pixmap width */
     780    if (   model()->currentItem() == this
     781        || isHovered())
     782    {
     783        iFirstRowMaximumWidth -= iMajorSpacing; /* spacing between name(s) and right pixmap */
     784        iFirstRowMaximumWidth -= m_toolsPixmapSize.width() + 2 * iButtonMargin; /* right pixmap width */
     785    }
    776786    iFirstRowMaximumWidth -= iMargin; /* right margin */
    777787
  • trunk/src/VBox/Frontends/VirtualBox/src/manager/chooser/UIChooserItemMachine.h

    r76933 r76935  
    192192        /** Handles top-level window remaps. */
    193193        void sltHandleWindowRemapped();
     194
     195        /** Updates first row maximum width. */
     196        void sltUpdateFirstRowMaximumWidth() { updateFirstRowMaximumWidth(); }
    194197    /** @} */
    195198
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