VirtualBox

Changeset 94985 in vbox


Ignore:
Timestamp:
May 11, 2022 6:34:06 PM (3 years ago)
Author:
vboxsync
svn:sync-xref-src-repo-rev:
151410
Message:

FE/Qt/Ds: QIToolBar: Few fixes for unified toolbar feature on macOS.

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

Legend:

Unmodified
Added
Removed
  • trunk/src/VBox/Frontends/VirtualBox/src/extensions/QIToolBar.cpp

    r93115 r94985  
    108108    if (m_fEmulateUnifiedToolbar)
    109109    {
    110         /* Acquire rectangle: */
    111         const QRect rectangle = pEvent->rect();
     110        /* Limit painting with incoming rectangle: */
     111        QPainter painter(this);
     112        painter.setClipRect(pEvent->rect());
     113
     114        /* Acquire full rectangle: */
     115        const QRect rectangle = rect();
    112116
    113117        /* Prepare gradient: */
     
    118122
    119123        /* Fill background: */
    120         QPainter painter(this);
    121124        painter.fillRect(rectangle, gradient);
    122125    }
  • trunk/src/VBox/Frontends/VirtualBox/src/extensions/QIToolBar.h

    r93990 r94985  
    8585
    8686#ifdef VBOX_WS_MAC
    87     /** Holds whether unified tool-bar should be emulated. */
     87    /** Mac OS X: Holds whether unified tool-bar should be emulated. */
    8888    bool  m_fEmulateUnifiedToolbar;
    8989#endif
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