From f209ff4b488f2ea3fa39bbed57dbbb8fe0162a3b Mon Sep 17 00:00:00 2001 From: Timothy Pearson Date: Tue, 16 Oct 2012 15:39:47 -0500 Subject: Move hover widget code into the Qt core instead of the styles This more closely matches other widget toolkits such as GTK --- src/widgets/qslider.cpp | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) (limited to 'src/widgets/qslider.cpp') 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 ); -- cgit v1.2.1