summaryrefslogtreecommitdiffstats
path: root/src/widgets/doc/snippets/customstyle
diff options
context:
space:
mode:
authorOswald Buddenhagen <oswald.buddenhagen@digia.com>2014-01-13 15:48:44 +0100
committerThe Qt Project <gerrit-noreply@qt-project.org>2014-01-13 22:46:50 +0100
commit882bf3475c8926abe62ed71e6719458b024caac0 (patch)
treef227c1c660776da1ece9149b1c9e3ca5b27d8687 /src/widgets/doc/snippets/customstyle
parent81157d23749f6ee1feef35a04fa9cc989ebc01eb (diff)
expand tabs and related whitespace fixes in *.{cpp,h,qdoc}
the diff -w for this commit is empty. Started-by: Thiago Macieira <thiago.macieira@intel.com> Change-Id: I77bb84e71c63ce75e0709e5b94bee18e3ce6ab9e Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
Diffstat (limited to 'src/widgets/doc/snippets/customstyle')
-rw-r--r--src/widgets/doc/snippets/customstyle/customstyle.cpp48
1 files changed, 24 insertions, 24 deletions
diff --git a/src/widgets/doc/snippets/customstyle/customstyle.cpp b/src/widgets/doc/snippets/customstyle/customstyle.cpp
index 9d00745e6a..b5d44ebecd 100644
--- a/src/widgets/doc/snippets/customstyle/customstyle.cpp
+++ b/src/widgets/doc/snippets/customstyle/customstyle.cpp
@@ -57,32 +57,32 @@ void CustomStyle::drawPrimitive(PrimitiveElement element, const QStyleOption *op
QPainter *painter, const QWidget *widget) const
{
if (element == PE_IndicatorSpinUp || element == PE_IndicatorSpinDown) {
- QPolygon points(3);
- int x = option->rect.x();
- int y = option->rect.y();
- int w = option->rect.width() / 2;
- int h = option->rect.height() / 2;
- x += (option->rect.width() - w) / 2;
- y += (option->rect.height() - h) / 2;
+ QPolygon points(3);
+ int x = option->rect.x();
+ int y = option->rect.y();
+ int w = option->rect.width() / 2;
+ int h = option->rect.height() / 2;
+ x += (option->rect.width() - w) / 2;
+ y += (option->rect.height() - h) / 2;
- if (element == PE_IndicatorSpinUp) {
- points[0] = QPoint(x, y + h);
- points[1] = QPoint(x + w, y + h);
- points[2] = QPoint(x + w / 2, y);
- } else { // PE_SpinBoxDown
- points[0] = QPoint(x, y);
- points[1] = QPoint(x + w, y);
- points[2] = QPoint(x + w / 2, y + h);
- }
+ if (element == PE_IndicatorSpinUp) {
+ points[0] = QPoint(x, y + h);
+ points[1] = QPoint(x + w, y + h);
+ points[2] = QPoint(x + w / 2, y);
+ } else { // PE_SpinBoxDown
+ points[0] = QPoint(x, y);
+ points[1] = QPoint(x + w, y);
+ points[2] = QPoint(x + w / 2, y + h);
+ }
- if (option->state & State_Enabled) {
- painter->setPen(option->palette.mid().color());
- painter->setBrush(option->palette.buttonText());
- } else {
- painter->setPen(option->palette.buttonText().color());
- painter->setBrush(option->palette.mid());
- }
- painter->drawPolygon(points);
+ if (option->state & State_Enabled) {
+ painter->setPen(option->palette.mid().color());
+ painter->setBrush(option->palette.buttonText());
+ } else {
+ painter->setPen(option->palette.buttonText().color());
+ painter->setBrush(option->palette.mid());
+ }
+ painter->drawPolygon(points);
} else {
QProxyStyle::drawPrimitive(element, option, painter, widget);
//! [2] //! [3]