summaryrefslogtreecommitdiffstats
path: root/src/gui
diff options
context:
space:
mode:
authorSami Merilä <sami.merila@nokia.com>2009-11-12 10:49:11 (GMT)
committerSami Merilä <sami.merila@nokia.com>2009-11-12 10:49:11 (GMT)
commit3826d81d96c53f253f2f75683cd1802faa1628df (patch)
treea56425ff16bf8965c34fdc0875348b025b5b1471 /src/gui
parent0779fbb16838a5d857665a0d70e30e2ba49cefba (diff)
downloadQt-3826d81d96c53f253f2f75683cd1802faa1628df.zip
Qt-3826d81d96c53f253f2f75683cd1802faa1628df.tar.gz
Qt-3826d81d96c53f253f2f75683cd1802faa1628df.tar.bz2
Tab shapes have the wrong size and distance between them on Symbian
With certain themes it is really apparent that the tabshape rect and position deduction in QS60Style has some issues. See for example 5800Xm's default theme. TabShapes have huge spaces between them. Problem is that the initializer in style for tab shape assumes that the side parts of the frame are squares and will use 1:1 ratio (width:height) when upscaling the theme graphic draw area. This leads to that tabshape graphics will not fill in the whole area reserved for them. When initial area has ratio of 1:2 (for horizontal tab shape), upscaling pruduces correct rect and graphic is drawn correctly. Task-number: QTBUG-5659 Reviewed-by: Alessandro Portale
Diffstat (limited to 'src/gui')
-rw-r--r--src/gui/styles/qs60style.cpp5
1 files changed, 4 insertions, 1 deletions
diff --git a/src/gui/styles/qs60style.cpp b/src/gui/styles/qs60style.cpp
index a1dab86..9179237 100644
--- a/src/gui/styles/qs60style.cpp
+++ b/src/gui/styles/qs60style.cpp
@@ -799,6 +799,9 @@ QSize QS60StylePrivate::partSize(QS60StyleEnums::SkinParts part, SkinElementFlag
case QS60StyleEnums::SP_QgnGrafTabPassiveR:
case QS60StyleEnums::SP_QgnGrafTabPassiveL:
case QS60StyleEnums::SP_QgnGrafTabActiveL:
+ //Returned QSize for tabs must not be square, but narrow rectangle with width:height
+ //ratio of 1:2 for horizontal tab bars (and 2:1 for vertical ones).
+ result.setWidth(10);
break;
case QS60StyleEnums::SP_QgnIndiSliderEdit:
result.scale(pixelMetric(QStyle::PM_SliderLength),
@@ -809,7 +812,7 @@ QSize QS60StylePrivate::partSize(QS60StyleEnums::SkinParts part, SkinElementFlag
case QS60StyleEnums::SP_QgnGrafBarFrameSideR:
result.setWidth(pixelMetric(PM_Custom_FrameCornerWidth));
break;
-
+
case QS60StyleEnums::SP_QsnCpScrollHandleBottomPressed:
case QS60StyleEnums::SP_QsnCpScrollHandleTopPressed:
case QS60StyleEnums::SP_QsnCpScrollHandleMiddlePressed: