diff options
author | Jens Bache-Wiig <jbache@trolltech.com> | 2010-05-04 12:04:48 (GMT) |
---|---|---|
committer | Jens Bache-Wiig <jbache@trolltech.com> | 2010-05-04 12:06:34 (GMT) |
commit | 5c1fe0fc017e116b2643d2b8278f7fca6fec10a1 (patch) | |
tree | 99a3bf1ee2790257adf587f786888ebd264c0351 | |
parent | 78c96aff83d9e5a181f549311d7e9e83b28f1b57 (diff) | |
download | Qt-5c1fe0fc017e116b2643d2b8278f7fca6fec10a1.zip Qt-5c1fe0fc017e116b2643d2b8278f7fca6fec10a1.tar.gz Qt-5c1fe0fc017e116b2643d2b8278f7fca6fec10a1.tar.bz2 |
Fix missing pressed state for scrollbars with QGtkStyle
Pushing this to 4.7 as it is an easy fix and highly noticable
in the latest official release of Ubuntu.
Task-number: QTBUG-10396
Reviewed-by: thorbjorn
-rw-r--r-- | src/gui/styles/qgtkstyle.cpp | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/src/gui/styles/qgtkstyle.cpp b/src/gui/styles/qgtkstyle.cpp index 9c61023..e3ca8b2 100644 --- a/src/gui/styles/qgtkstyle.cpp +++ b/src/gui/styles/qgtkstyle.cpp @@ -1643,6 +1643,7 @@ void QGtkStyle::drawComplexControl(ComplexControl control, const QStyleOptionCom style = scrollbarWidget->style; gboolean trough_under_steppers = true; gboolean trough_side_details = false; + gboolean activate_slider = false; gboolean stepper_size = 14; gint trough_border = 1; if (!d->gtk_check_version(2, 10, 0)) { @@ -1650,6 +1651,7 @@ void QGtkStyle::drawComplexControl(ComplexControl control, const QStyleOptionCom "trough-border", &trough_border, "trough-side-details", &trough_side_details, "trough-under-steppers", &trough_under_steppers, + "activate-slider", &activate_slider, "stepper-size", &stepper_size, NULL); } if (trough_under_steppers) { @@ -1695,6 +1697,9 @@ void QGtkStyle::drawComplexControl(ComplexControl control, const QStyleOptionCom if (!(option->state & State_Enabled)) state = GTK_STATE_INSENSITIVE; + else if (activate_slider && + option->state & State_Sunken && (scrollBar->activeSubControls & SC_ScrollBarSlider)) + state = GTK_STATE_ACTIVE; else if (option->state & State_MouseOver && (scrollBar->activeSubControls & SC_ScrollBarSlider)) state = GTK_STATE_PRELIGHT; |