summaryrefslogtreecommitdiffstats
path: root/src/gui/styles
diff options
context:
space:
mode:
Diffstat (limited to 'src/gui/styles')
-rw-r--r--src/gui/styles/qs60style.cpp15
-rw-r--r--src/gui/styles/qs60style_s60.cpp2
-rw-r--r--src/gui/styles/qwindowsmobilestyle.cpp17
3 files changed, 21 insertions, 13 deletions
diff --git a/src/gui/styles/qs60style.cpp b/src/gui/styles/qs60style.cpp
index a2ebebb..750e19f 100644
--- a/src/gui/styles/qs60style.cpp
+++ b/src/gui/styles/qs60style.cpp
@@ -2069,11 +2069,11 @@ void QS60Style::drawPrimitive(PrimitiveElement element, const QStyleOption *opti
break;
case PE_IndicatorViewItemCheck:
#ifndef QT_NO_ITEMVIEWS
- if (const QListView *listItem = (qobject_cast<const QListView *>(widget))) {
+ if (const QAbstractItemView *itemView = (qobject_cast<const QAbstractItemView *>(widget))) {
if (const QStyleOptionViewItemV4 *vopt = qstyleoption_cast<const QStyleOptionViewItemV4 *>(option)) {
const bool checkBoxVisible = vopt->features & QStyleOptionViewItemV2::HasCheckIndicator;
- const bool singleSelection = listItem->selectionMode() ==
- QAbstractItemView::SingleSelection || listItem->selectionMode() == QAbstractItemView::NoSelection;
+ const bool singleSelection = itemView->selectionMode() ==
+ QAbstractItemView::SingleSelection || itemView->selectionMode() == QAbstractItemView::NoSelection;
// draw either checkbox at the beginning
if (checkBoxVisible && singleSelection) {
drawPrimitive(PE_IndicatorCheckBox, option, painter, widget);
@@ -2475,6 +2475,12 @@ int QS60Style::styleHint(StyleHint sh, const QStyleOption *opt, const QWidget *w
{
int retValue = -1;
switch (sh) {
+ case SH_RequestSoftwareInputPanel:
+ if (QS60StylePrivate::isSingleClickUi())
+ retValue = RSIP_OnMouseClick;
+ else
+ retValue = RSIP_OnMouseClickAndAlreadyFocused;
+ break;
case SH_ComboBox_Popup:
retValue = true;
break;
@@ -2531,9 +2537,6 @@ int QS60Style::styleHint(StyleHint sh, const QStyleOption *opt, const QWidget *w
case SH_UnderlineShortcut:
retValue = 0;
break;
- case SH_RequestSoftwareInputPanel:
- retValue = RSIP_OnMouseClickAndAlreadyFocused;
- break;
case SH_FormLayoutWrapPolicy:
retValue = QFormLayout::WrapLongRows;
break;
diff --git a/src/gui/styles/qs60style_s60.cpp b/src/gui/styles/qs60style_s60.cpp
index ecac3d6..6138e85 100644
--- a/src/gui/styles/qs60style_s60.cpp
+++ b/src/gui/styles/qs60style_s60.cpp
@@ -1121,7 +1121,7 @@ QColor QS60StylePrivate::s60Color(QS60StyleEnums::ColorLists list,
&KAknsIIDQsnParentColors,
&KAknsIIDQsnTextColors
};
- Q_ASSERT((int)list <= (int)sizeof(idMap)/sizeof(idMap[0]));
+ Q_ASSERT((int)list < (int)sizeof(idMap)/sizeof(idMap[0]));
const QColor color = QS60StyleModeSpecifics::colorValue(*idMap[(int) list], index - 1);
return option ? QS60StylePrivate::stateColor(color, option) : color;
}
diff --git a/src/gui/styles/qwindowsmobilestyle.cpp b/src/gui/styles/qwindowsmobilestyle.cpp
index 6e77409..5f939d0 100644
--- a/src/gui/styles/qwindowsmobilestyle.cpp
+++ b/src/gui/styles/qwindowsmobilestyle.cpp
@@ -5076,6 +5076,10 @@ void QWindowsMobileStyle::drawPrimitive(PrimitiveElement element, const QStyleOp
color = option->palette.buttonText().color();
QImage image;
int xoffset, yoffset;
+ bool isTabBarArrow = widget && widget->parent()
+ && widget->inherits("QToolButton")
+ && widget->parent()->inherits("QTabBar");
+
switch (element) {
case PE_IndicatorArrowUp:
image = d->imageArrowUp;
@@ -5090,12 +5094,12 @@ void QWindowsMobileStyle::drawPrimitive(PrimitiveElement element, const QStyleOp
case PE_IndicatorArrowLeft:
image = d->imageArrowLeft;
xoffset = 8;
- yoffset = 2;
+ yoffset = isTabBarArrow ? 12 : 2;
break;
case PE_IndicatorArrowRight:
image = d->imageArrowRight;
xoffset = 8;
- yoffset = 2;
+ yoffset = isTabBarArrow ? 12 : 2;
break;
case PE_IndicatorArrowUpBig:
image = d->imageArrowUpBig;
@@ -6949,10 +6953,11 @@ int QWindowsMobileStyle::pixelMetric(PixelMetric pm, const QStyleOption *opt, co
case PM_SliderThickness:
ret = d->doubleControls ? windowsMobileSliderThickness * 2: windowsMobileSliderThickness;
break;
- case PM_TabBarScrollButtonWidth:
- ret = d->doubleControls ? 14 * 2 : 18;
- case PM_CheckBoxLabelSpacing:
- case PM_RadioButtonLabelSpacing:
+ case PM_TabBarScrollButtonWidth:
+ ret = d->doubleControls ? 14 * 2 : 18;
+ break;
+ case PM_CheckBoxLabelSpacing:
+ case PM_RadioButtonLabelSpacing:
ret = d->doubleControls ? 6 * 2 : 6;
break;
// Returns the number of pixels to use for the business part of the