diff options
author | Sami Merilä <sami.merila@nokia.com> | 2009-05-26 15:03:52 (GMT) |
---|---|---|
committer | Sami Merilä <sami.merila@nokia.com> | 2009-05-26 15:03:52 (GMT) |
commit | 4998ad5f72314b48ad8c8115b64f4cb4b747c2bc (patch) | |
tree | 8d27a1caca0fed640eb0c230b3bff4f83b6dfd4c | |
parent | f2b486bfc332ecfe37831ef9468b953acfab2b45 (diff) | |
download | Qt-4998ad5f72314b48ad8c8115b64f4cb4b747c2bc.zip Qt-4998ad5f72314b48ad8c8115b64f4cb4b747c2bc.tar.gz Qt-4998ad5f72314b48ad8c8115b64f4cb4b747c2bc.tar.bz2 |
S60Style: Tidy up the code - remove 'todo's.
-rw-r--r-- | src/gui/styles/qs60style.cpp | 23 |
1 files changed, 7 insertions, 16 deletions
diff --git a/src/gui/styles/qs60style.cpp b/src/gui/styles/qs60style.cpp index 5026d5c..071b60a 100644 --- a/src/gui/styles/qs60style.cpp +++ b/src/gui/styles/qs60style.cpp @@ -354,12 +354,15 @@ void QS60StylePrivate::clearCaches(QS60StylePrivate::CacheClearReason reason) { switch(reason){ case CC_LayoutChange: - // when layout changes, the colors remain in cache - m_mappedFontsCache.clear(); //todo: can font change, when layout changes? + // when layout changes, the colors remain in cache, but graphics and fonts can change + m_mappedFontsCache.clear(); m_backgroundValid = false; QPixmapCache::clear(); break; - case CC_ThemeChange: //todo: can font change when theme changes? + case CC_ThemeChange: + m_colorCache.clear(); + QPixmapCache::clear(); + m_backgroundValid = false; case CC_UndefinedChange: default: m_colorCache.clear(); @@ -839,7 +842,6 @@ void QS60Style::drawComplexControl(ComplexControl control, const QStyleOptionCom const bool direction = cmb->direction == Qt::LeftToRight; // Button frame - //todo: why calc rect here for button? Is there no suitable SE_xxx for that? QStyleOptionFrame buttonOption; buttonOption.QStyleOption::operator=(*cmb); const int maxHeight = cmbxFrame.height(); @@ -849,7 +851,6 @@ void QS60Style::drawComplexControl(ComplexControl control, const QStyleOptionCom buttonOption.rect = buttonRect; buttonOption.state = cmb->state & (State_Enabled | State_MouseOver); drawPrimitive(PE_PanelButtonCommand, &buttonOption, painter, widget); - // todo: we could draw qgn_prop_set_button skin item here // draw label background - label itself is drawn separately const QS60StylePrivate::SkinElements skinElement = QS60StylePrivate::SE_FrameLineEdit; @@ -1108,14 +1109,6 @@ void QS60Style::drawComplexControl(ComplexControl control, const QStyleOptionCom break; #endif //QT_NO_DIAL - //todo: remove non-used complex widgets in final version - case CC_TitleBar: -#ifdef QT3_SUPPORT - case CC_Q3ListView: -#endif //QT3_SUPPORT -#ifndef QT_NO_WORKSPACE - case CC_MdiControls: -#endif //QT_NO_WORKSPACE default: QCommonStyle::drawComplexControl(control, option, painter, widget); } @@ -1413,7 +1406,6 @@ void QS60Style::drawControl(ControlElement element, const QStyleOption *option, const int tabOverlap = QS60StylePrivate::pixelMetric(QStyle::PM_TabBarTabOverlap) - borderThickness; //todo: draw navi wipe behind tabbar - must be drawn with first draw - //QS60StylePrivate::drawSkinElement(QS60StylePrivate::SE_TableHeaderItem, painter, windowRect, flags); if (skinElement==QS60StylePrivate::SE_TabBarTabEastInactive|| skinElement==QS60StylePrivate::SE_TabBarTabEastActive|| @@ -1690,7 +1682,6 @@ void QS60Style::drawControl(ControlElement element, const QStyleOption *option, break; #endif //QT_NO_MENU - //todo: remove non-used widgets in final version case CE_MenuEmptyArea: #ifndef QT_NO_MENUBAR case CE_MenuBarEmptyArea: @@ -1799,6 +1790,7 @@ void QS60Style::drawControl(ControlElement element, const QStyleOption *option, break; #endif //QT_NO_TOOLBAR + //todo: remove non-used widgets in final version case CE_ShapedFrame: case CE_MenuVMargin: case CE_MenuHMargin: @@ -2450,7 +2442,6 @@ QRect QS60Style::subElementRect(SubElement element, const QStyleOption *opt, con case SE_LineEditContents: { // in S60 the input text box doesn't start from line Edit's TL, but // a bit indented. - // todo: Should we NOT do this for combo boxes and spin boxes? QRect lineEditRect = opt->rect; int adjustment = opt->rect.height()>>2; lineEditRect.adjust(adjustment,0,0,0); |