summaryrefslogtreecommitdiffstats
path: root/src/widgets/styles/qwindowsstyle.cpp
diff options
context:
space:
mode:
authorZhang Sheng <zhangsheng@uniontech.com>2020-11-16 11:19:17 +0800
committerZhang Sheng <zhangsheng@uniontech.com>2020-11-16 12:53:37 +0000
commite13173c112b729da8f53dd2e81e8116a1ed857cf (patch)
tree49c2bce0c3349eebd0f2b62c80a1b7168ae45dc2 /src/widgets/styles/qwindowsstyle.cpp
parent802e5a45baf3ac7da2cb3be06d10bdd69696fcae (diff)
Adjust code format, add space after 'if'
Change-Id: Ice081c891ff7f4b766f49dd4bd5cf18c30237acf Reviewed-by: Allan Sandfeld Jensen <allan.jensen@qt.io> Reviewed-by: hjk <hjk@qt.io>
Diffstat (limited to 'src/widgets/styles/qwindowsstyle.cpp')
-rw-r--r--src/widgets/styles/qwindowsstyle.cpp14
1 files changed, 7 insertions, 7 deletions
diff --git a/src/widgets/styles/qwindowsstyle.cpp b/src/widgets/styles/qwindowsstyle.cpp
index 02188c5b29..ec252d9293 100644
--- a/src/widgets/styles/qwindowsstyle.cpp
+++ b/src/widgets/styles/qwindowsstyle.cpp
@@ -267,7 +267,7 @@ void QWindowsStyle::polish(QApplication *app)
d->inactiveCaptionText = palette.window().color();
#if defined(Q_OS_WIN) //fetch native title bar colors
- if(app->desktopSettingsAware()){
+ if (app->desktopSettingsAware()){
DWORD activeCaption = GetSysColor(COLOR_ACTIVECAPTION);
DWORD gradientActiveCaption = GetSysColor(COLOR_GRADIENTACTIVECAPTION);
DWORD inactiveCaption = GetSysColor(COLOR_INACTIVECAPTION);
@@ -630,7 +630,7 @@ int QWindowsStyle::styleHint(StyleHint hint, const QStyleOption *opt, const QWid
ret = 0;
if (rbOpt->shape == QRubberBand::Rectangle) {
ret = true;
- if(QStyleHintReturnMask *mask = qstyleoption_cast<QStyleHintReturnMask*>(returnData)) {
+ if (QStyleHintReturnMask *mask = qstyleoption_cast<QStyleHintReturnMask*>(returnData)) {
mask->region = opt->rect;
int size = 1;
if (widget && widget->isWindow())
@@ -673,7 +673,7 @@ void QWindowsStyle::drawPrimitive(PrimitiveElement pe, const QStyleOption *opt,
QRect rect = opt->rect;
const int margin = 2;
QPen oldPen = p->pen();
- if(opt->state & State_Horizontal){
+ if (opt->state & State_Horizontal){
const int offset = rect.width()/2;
p->setPen(QPen(opt->palette.dark().color()));
p->drawLine(rect.bottomLeft().x() + offset,
@@ -758,7 +758,7 @@ void QWindowsStyle::drawPrimitive(PrimitiveElement pe, const QStyleOption *opt,
if (opt->state & (State_Raised | State_Sunken | State_On)) {
if (opt->state & State_AutoRaise) {
- if(opt->state & (State_Enabled | State_Sunken | State_On)){
+ if (opt->state & (State_Enabled | State_Sunken | State_On)){
if (panel)
qDrawShadePanel(p, opt->rect, opt->palette,
opt->state & (State_Sunken | State_On), 1, &fill);
@@ -1618,7 +1618,7 @@ void QWindowsStyle::drawControl(ControlElement ce, const QStyleOption *opt, QPai
default:
break;
}
- if(opt->direction == Qt::RightToLeft){ //reverse layout changes the order of Beginning/end
+ if (opt->direction == Qt::RightToLeft){ //reverse layout changes the order of Beginning/end
bool tmp = paintLeftBorder;
paintRightBorder=paintLeftBorder;
paintLeftBorder=tmp;
@@ -1733,7 +1733,7 @@ void QWindowsStyle::drawControl(ControlElement ce, const QStyleOption *opt, QPai
int myHeight = pbBits.rect.height();
int chunksToDraw = chunksInRow;
- if(step > chunkCount - 5)chunksToDraw = (chunkCount - step);
+ if (step > chunkCount - 5)chunksToDraw = (chunkCount - step);
p->save();
p->setClipRect(m.mapRect(QRectF(rect)).toRect());
@@ -1747,7 +1747,7 @@ void QWindowsStyle::drawControl(ControlElement ce, const QStyleOption *opt, QPai
x += reverse ? -unit_width : unit_width;
}
//Draw wrap-around chunks
- if( step > chunkCount-5){
+ if ( step > chunkCount-5){
x0 = reverse ? rect.left() + rect.width() - unit_width : rect.left() ;
x = 0;
int chunksToDraw = step - (chunkCount - chunksInRow);