diff options
author | Sami Merilä <sami.merila@nokia.com> | 2009-11-26 12:17:11 (GMT) |
---|---|---|
committer | Sami Merilä <sami.merila@nokia.com> | 2009-11-26 12:17:11 (GMT) |
commit | b56dcd0f2093c35b1d638eebe38d113e8d59ea0c (patch) | |
tree | e61826317a8adff38dc64db20e51e8905a8c7440 /src/gui/styles/qs60style.cpp | |
parent | 6853552c2860510bed867042376fc3980aa7cad0 (diff) | |
download | Qt-b56dcd0f2093c35b1d638eebe38d113e8d59ea0c.zip Qt-b56dcd0f2093c35b1d638eebe38d113e8d59ea0c.tar.gz Qt-b56dcd0f2093c35b1d638eebe38d113e8d59ea0c.tar.bz2 |
Tidyup QS60Style - remove unused constants, replace magic values
Basically this has three minor fixes:
- remove unused style parts that were left over after unifying textEdit
and lineEdit graphics
- make radiobutton indicator one pixel smaller so it is perfect
circle
- replace magic "10" with calculated value
Reviewed-by: Alessandro Portale
Diffstat (limited to 'src/gui/styles/qs60style.cpp')
-rw-r--r-- | src/gui/styles/qs60style.cpp | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/src/gui/styles/qs60style.cpp b/src/gui/styles/qs60style.cpp index a9636b6..dca78ca 100644 --- a/src/gui/styles/qs60style.cpp +++ b/src/gui/styles/qs60style.cpp @@ -144,7 +144,7 @@ const struct QS60StylePrivate::frameElementCenter QS60StylePrivate::m_frameEleme {SE_ToolBarButtonPressed, QS60StyleEnums::SP_QsnFrSctrlButtonCenterPressed}, {SE_PanelBackground, QS60StyleEnums::SP_QsnFrSetOptCenter}, {SE_ButtonInactive, QS60StyleEnums::SP_QsnFrButtonCenterInactive}, - {SE_Editor, QS60StyleEnums::SP_QsnFrNotepadCenter}, + {SE_Editor, QS60StyleEnums::SP_QsnFrInputCenter}, }; static const int frameElementsCount = @@ -807,7 +807,7 @@ QSize QS60StylePrivate::partSize(QS60StyleEnums::SkinParts part, SkinElementFlag 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); + result.setWidth(result.height()>>1); break; case QS60StyleEnums::SP_QgnIndiSliderEdit: result.scale(pixelMetric(QStyle::PM_SliderLength), @@ -2022,7 +2022,7 @@ void QS60Style::drawPrimitive(PrimitiveElement element, const QStyleOption *opti buttonRect.setHeight((int)(buttonRect.height() * scaler)); // move the rect up for half of the new height-gain const int newY = (buttonRect.bottomRight().y() - option->rect.bottomRight().y()) >> 1 ; - buttonRect.adjust(0,-newY,0,-newY); + buttonRect.adjust(0, -newY, -1, -newY); painter->save(); QColor themeColor = d->s60Color(QS60StyleEnums::CL_QsnTextColors, 6, option); |