VirtualBox

Changeset 22865 in vbox


Ignore:
Timestamp:
Sep 9, 2009 1:20:33 PM (15 years ago)
Author:
vboxsync
Message:

FE/Qt4-OSX: Enable the new slider on the Mac as well.

File:
1 edited

Legend:

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

    r21437 r22865  
    6060    virtual void paintEvent (QPaintEvent *aEvent)
    6161    {
    62 #ifndef Q_WS_MAC
    6362        QPainter p(this);
    6463
     
    7170
    7271        QRect ticks = style()->subControlRect (QStyle::CC_Slider, &opt, QStyle::SC_SliderTickmarks, this);
     72#ifdef Q_WS_MAC
     73        ticks.setRect ((s.width() - available) / 2, s.height() - ticks.y(), available, ticks.height());
     74#else /* Q_WS_MAC */
    7375        if (ticks.isNull() || ticks.isEmpty())
    7476        {
     
    7678            ticks.setRect ((s.width() - available) / 2, ticks.bottom() + 1, available, s.height() - ticks.bottom() - 1);
    7779        }
     80#endif /* Q_WS_MAC */
    7881        if (mMinOpt != -1 &&
    7982            mMaxOpt != -1)
     
    98101        }
    99102        p.end();
    100 #endif /* !Q_WS_MAC */
    101103
    102104        QSlider::paintEvent (aEvent);
     
    264266int QIAdvancedSlider::snapValue(int val)
    265267{
    266 #ifndef Q_WS_MAC
    267268    if (mSnappingEnabled &&
    268269        val > 2)
     
    281282        }
    282283    }
    283 #endif /* !Q_WS_MAC */
    284284    return val;
    285285}
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