diff options
author | Sami Merila <sami.merila@nokia.com> | 2010-01-25 13:58:56 (GMT) |
---|---|---|
committer | Sami Merila <sami.merila@nokia.com> | 2010-01-25 13:58:56 (GMT) |
commit | 9bb9991b7c6182249cbf922e4718e1c64e3c6433 (patch) | |
tree | eef4e4d511f43a249cc13854d609768716f2d1f5 /src/gui/styles | |
parent | 5f9d86d137eedf45d1067dd54b1d54c2e1eab4b9 (diff) | |
download | Qt-9bb9991b7c6182249cbf922e4718e1c64e3c6433.zip Qt-9bb9991b7c6182249cbf922e4718e1c64e3c6433.tar.gz Qt-9bb9991b7c6182249cbf922e4718e1c64e3c6433.tar.bz2 |
QListWidget itemActivated does not follow S60 conventions
Set StyleHint SH_ItemView_ActivateItemOnSingleClick inactive for 3.x
and 5th edition S60.
Task-number: QTBUG-6182
Reviewed-by: Alessandro Portale
Diffstat (limited to 'src/gui/styles')
-rw-r--r-- | src/gui/styles/qs60style.cpp | 2 | ||||
-rw-r--r-- | src/gui/styles/qs60style_p.h | 1 | ||||
-rw-r--r-- | src/gui/styles/qs60style_s60.cpp | 5 | ||||
-rw-r--r-- | src/gui/styles/qs60style_simulated.cpp | 5 |
4 files changed, 12 insertions, 1 deletions
diff --git a/src/gui/styles/qs60style.cpp b/src/gui/styles/qs60style.cpp index 9dcf291..5a4e6df 100644 --- a/src/gui/styles/qs60style.cpp +++ b/src/gui/styles/qs60style.cpp @@ -2436,7 +2436,7 @@ int QS60Style::styleHint(StyleHint sh, const QStyleOption *opt, const QWidget *w retValue = QPalette::Base; break; case SH_ItemView_ActivateItemOnSingleClick: - retValue = true; + retValue = QS60StylePrivate::isSingleClickUi(); break; case SH_ProgressDialog_TextLabelAlignment: retValue = (QApplication::layoutDirection() == Qt::LeftToRight) ? diff --git a/src/gui/styles/qs60style_p.h b/src/gui/styles/qs60style_p.h index 2d2f2e1..2cd238f 100644 --- a/src/gui/styles/qs60style_p.h +++ b/src/gui/styles/qs60style_p.h @@ -499,6 +499,7 @@ public: static bool isTouchSupported(); static bool isToolBarBackground(); static bool hasSliderGrooveGraphic(); + static bool isSingleClickUi(); // calculates average color based on button skin graphics (minus borders). QColor colorFromFrameGraphics(SkinFrameElements frame) const; diff --git a/src/gui/styles/qs60style_s60.cpp b/src/gui/styles/qs60style_s60.cpp index 5f3a499..a3bb169 100644 --- a/src/gui/styles/qs60style_s60.cpp +++ b/src/gui/styles/qs60style_s60.cpp @@ -649,6 +649,11 @@ bool QS60StylePrivate::hasSliderGrooveGraphic() return QSysInfo::s60Version() != QSysInfo::SV_S60_3_1; } +bool QS60StylePrivate::isSingleClickUi() +{ + return (QSysInfo::s60Version() > QSysInfo::SV_S60_5_0); +} + QPoint qt_s60_fill_background_offset(const QWidget *targetWidget) { CCoeControl *control = targetWidget->effectiveWinId(); diff --git a/src/gui/styles/qs60style_simulated.cpp b/src/gui/styles/qs60style_simulated.cpp index 557243c..f87cf28 100644 --- a/src/gui/styles/qs60style_simulated.cpp +++ b/src/gui/styles/qs60style_simulated.cpp @@ -342,6 +342,11 @@ bool QS60StylePrivate::hasSliderGrooveGraphic() return false; } +bool QS60StylePrivate::isSingleClickUi() +{ + return false; +} + QFont QS60StylePrivate::s60Font_specific( QS60StyleEnums::FontCategories fontCategory, int pointSize, bool resolveFontSize) |