summaryrefslogtreecommitdiffstats
path: root/src/widgets
diff options
context:
space:
mode:
Diffstat (limited to 'src/widgets')
-rw-r--r--src/widgets/styles/qfusionstyle_p_p.h4
-rw-r--r--src/widgets/styles/qwindowsstyle.cpp21
2 files changed, 19 insertions, 6 deletions
diff --git a/src/widgets/styles/qfusionstyle_p_p.h b/src/widgets/styles/qfusionstyle_p_p.h
index f0f00c4311..21d9d439a4 100644
--- a/src/widgets/styles/qfusionstyle_p_p.h
+++ b/src/widgets/styles/qfusionstyle_p_p.h
@@ -104,7 +104,7 @@ public:
}
QColor outline(const QPalette &pal) const {
- if (!pal.window().texture().isNull())
+ if (pal.window().style() == Qt::TexturePattern)
return QColor(0, 0, 0, 160);
return pal.background().color().darker(140);
}
@@ -117,7 +117,7 @@ public:
}
QColor tabFrameColor(const QPalette &pal) const {
- if (!pal.button().texture().isNull())
+ if (pal.window().style() == Qt::TexturePattern)
return QColor(255, 255, 255, 8);
return buttonColor(pal).lighter(104);
}
diff --git a/src/widgets/styles/qwindowsstyle.cpp b/src/widgets/styles/qwindowsstyle.cpp
index 1336c04c42..e39a084cba 100644
--- a/src/widgets/styles/qwindowsstyle.cpp
+++ b/src/widgets/styles/qwindowsstyle.cpp
@@ -1525,8 +1525,14 @@ void QWindowsStyle::drawControl(ControlElement ce, const QStyleOption *opt, QPai
p->setBackground(opt->palette.dark().color());
p->setBrush(br);
} else {
- QPixmap pm = opt->palette.brush(QPalette::Light).texture();
- br = !pm.isNull() ? QBrush(pm) : QBrush(opt->palette.light().color(), Qt::Dense4Pattern);
+ const QBrush paletteBrush = opt->palette.brush(QPalette::Light);
+ if (paletteBrush.style() == Qt::TexturePattern) {
+ if (qHasPixmapTexture(paletteBrush))
+ br = QBrush(paletteBrush.texture());
+ else
+ br = QBrush(paletteBrush.textureImage());
+ } else
+ br = QBrush(opt->palette.light().color(), Qt::Dense4Pattern);
p->setBackground(opt->palette.background().color());
p->setBrush(br);
}
@@ -1536,8 +1542,15 @@ void QWindowsStyle::drawControl(ControlElement ce, const QStyleOption *opt, QPai
break; }
case CE_ScrollBarSlider:
if (!(opt->state & State_Enabled)) {
- QPixmap pm = opt->palette.brush(QPalette::Light).texture();
- QBrush br = !pm.isNull() ? QBrush(pm) : QBrush(opt->palette.light().color(), Qt::Dense4Pattern);
+ QBrush br;
+ const QBrush paletteBrush = opt->palette.brush(QPalette::Light);
+ if (paletteBrush.style() == Qt::TexturePattern) {
+ if (qHasPixmapTexture(paletteBrush))
+ br = QBrush(paletteBrush.texture());
+ else
+ br = QBrush(paletteBrush.textureImage());
+ } else
+ br = QBrush(opt->palette.light().color(), Qt::Dense4Pattern);
p->setPen(Qt::NoPen);
p->setBrush(br);
p->setBackgroundMode(Qt::OpaqueMode);