summaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
authorSami Merila <sami.merila@nokia.com>2010-04-14 10:11:10 (GMT)
committerSami Merila <sami.merila@nokia.com>2010-04-14 10:11:10 (GMT)
commit401aabde0d3da0e819a046f1eee47bb5f3a2d5d2 (patch)
treeaa212cd71643798e69530be13c5150bdfe132c4d /src
parent1c5c69b01659acc33bb49ffe4b078848b6a2a9de (diff)
downloadQt-401aabde0d3da0e819a046f1eee47bb5f3a2d5d2.zip
Qt-401aabde0d3da0e819a046f1eee47bb5f3a2d5d2.tar.gz
Qt-401aabde0d3da0e819a046f1eee47bb5f3a2d5d2.tar.bz2
QS60Style: HouseKeeping task
Remove unnecessary comment. Added one @todo comment. Some whitespace corrections. Removed unnecessary QStyle scopes. Reviewed-by: Alessandro Portale
Diffstat (limited to 'src')
-rw-r--r--src/gui/styles/qs60style.cpp19
1 files changed, 9 insertions, 10 deletions
diff --git a/src/gui/styles/qs60style.cpp b/src/gui/styles/qs60style.cpp
index 0ebfe39..27913cd 100644
--- a/src/gui/styles/qs60style.cpp
+++ b/src/gui/styles/qs60style.cpp
@@ -1542,7 +1542,6 @@ void QS60Style::drawControl(ControlElement element, const QStyleOption *option,
QS60StylePrivate::pixelMetric(PM_DefaultFrameWidth);
const int tabOverlap =
QS60StylePrivate::pixelMetric(PM_TabBarTabOverlap) - borderThickness;
- //todo: draw navi wipe behind tabbar - must be drawn with first draw
if (skinElement==QS60StylePrivate::SE_TabBarTabEastInactive||
skinElement==QS60StylePrivate::SE_TabBarTabEastActive||
@@ -1646,7 +1645,7 @@ void QS60Style::drawControl(ControlElement element, const QStyleOption *option,
painter->drawPixmap(tr.left() + tabOverlap,
tr.center().y() - (tabIcon.height() >> 1),
tabIcon);
- tr.setLeft(tr.left() + iconSize.width() + 4);
+ tr.setLeft(tr.left() + iconSize.width() + 4); //todo: magic four
}
QCommonStyle::drawItemText(painter, tr, alignment, optionTab.palette, tab->state & State_Enabled, tab->text, QPalette::WindowText);
@@ -1965,14 +1964,14 @@ void QS60Style::drawControl(ControlElement element, const QStyleOption *option,
// We need to reduce the focus frame size if LayoutSpacing is smaller than FocusFrameMargin
// Otherwise, we would overlay adjacent widgets.
const int frameHeightReduction =
- qMin(0, pixelMetric(QStyle::PM_LayoutVerticalSpacing)
- - pixelMetric(QStyle::PM_FocusFrameVMargin));
+ qMin(0, pixelMetric(PM_LayoutVerticalSpacing)
+ - pixelMetric(PM_FocusFrameVMargin));
const int frameWidthReduction =
- qMin(0, pixelMetric(QStyle::PM_LayoutHorizontalSpacing)
- - pixelMetric(QStyle::PM_FocusFrameHMargin));
+ qMin(0, pixelMetric(PM_LayoutHorizontalSpacing)
+ - pixelMetric(PM_FocusFrameHMargin));
const int rounding =
- qMin(pixelMetric(QStyle::PM_FocusFrameVMargin),
- pixelMetric(QStyle::PM_LayoutVerticalSpacing));
+ qMin(pixelMetric(PM_FocusFrameVMargin),
+ pixelMetric(PM_LayoutVerticalSpacing));
const QRect frameRect =
option->rect.adjusted(-frameWidthReduction, -frameHeightReduction,
frameWidthReduction, frameHeightReduction);
@@ -2848,7 +2847,7 @@ QRect QS60Style::subElementRect(SubElement element, const QStyleOption *opt, con
const int tabOverlapNoBorder =
QS60StylePrivate::pixelMetric(PM_TabBarTabOverlap);
const int tabOverlap =
- tabOverlapNoBorder-QS60StylePrivate::pixelMetric(PM_DefaultFrameWidth);
+ tabOverlapNoBorder - QS60StylePrivate::pixelMetric(PM_DefaultFrameWidth);
const QTabWidget *tab = qobject_cast<const QTabWidget *>(widget);
int gain = (tab) ? tabOverlap * tab->count() : 0;
switch (twf->shape) {
@@ -2914,7 +2913,7 @@ QRect QS60Style::subElementRect(SubElement element, const QStyleOption *opt, con
ret = QRect();
} else {
if (menuItem->direction == Qt::RightToLeft)
- ret.translate(ret.width()-indicatorWidth, 0);
+ ret.translate(ret.width() - indicatorWidth, 0);
ret.setWidth(indicatorWidth);
}
} else {