diff options
author | Jens Bache-Wiig <jbache@trolltech.com> | 2010-05-04 14:04:48 +0200 |
---|---|---|
committer | Samuli Piippo <samuli.piippo@digia.com> | 2011-06-09 13:05:49 +0300 |
commit | d1f5fd81a90c012cc8dcf88d092c8e24422dc9db (patch) | |
tree | 6d217d1229013b652e38c9e143ecd9df9766b64c /src | |
parent | dcdcc1e16187a05049b3f5bfcb667049d340f113 (diff) | |
download | qt4-tools-d1f5fd81a90c012cc8dcf88d092c8e24422dc9db.tar.gz |
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
(cherry picked from commit 5c1fe0fc017e116b2643d2b8278f7fca6fec10a1)
Diffstat (limited to 'src')
-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 aab9b9826f..5b5df9b2c3 100644 --- a/src/gui/styles/qgtkstyle.cpp +++ b/src/gui/styles/qgtkstyle.cpp @@ -1621,6 +1621,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)) { @@ -1628,6 +1629,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) { @@ -1673,6 +1675,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; |