diff options
author | Timothy Pearson <[email protected]> | 2012-10-16 15:39:47 -0500 |
---|---|---|
committer | Timothy Pearson <[email protected]> | 2012-10-16 15:39:47 -0500 |
commit | f209ff4b488f2ea3fa39bbed57dbbb8fe0162a3b (patch) | |
tree | b046beab59eda48afdbdb4ee3e9ae60881114b87 /src/widgets/qslider.cpp | |
parent | 4f8eb0410d666d41ccbc39b2bf5dea336af5c26c (diff) | |
download | qt3-f209ff4b488f2ea3fa39bbed57dbbb8fe0162a3b.tar.gz qt3-f209ff4b488f2ea3fa39bbed57dbbb8fe0162a3b.zip |
Move hover widget code into the Qt core instead of the styles
This more closely matches other widget toolkits such as GTK
Diffstat (limited to 'src/widgets/qslider.cpp')
-rw-r--r-- | src/widgets/qslider.cpp | 5 |
1 files changed, 4 insertions, 1 deletions
diff --git a/src/widgets/qslider.cpp b/src/widgets/qslider.cpp index f190f4f..6e92de4 100644 --- a/src/widgets/qslider.cpp +++ b/src/widgets/qslider.cpp @@ -415,10 +415,13 @@ void QSlider::paintEvent( QPaintEvent * ) flags |= QStyle::Style_Enabled; if (hasFocus()) flags |= QStyle::Style_HasFocus; + if (hasMouse()) + flags |= QStyle::Style_MouseOver; QStyle::SCFlags sub = QStyle::SC_SliderGroove | QStyle::SC_SliderHandle; - if ( tickmarks() != NoMarks ) + if ( tickmarks() != NoMarks ) { sub |= QStyle::SC_SliderTickmarks; + } style().drawComplexControl( QStyle::CC_Slider, &p, this, rect(), colorGroup(), flags, sub, state == Dragging ? QStyle::SC_SliderHandle : QStyle::SC_None ); |