summaryrefslogtreecommitdiffstats
path: root/src/widgets/styles
diff options
context:
space:
mode:
Diffstat (limited to 'src/widgets/styles')
-rw-r--r--src/widgets/styles/qfusionstyle.cpp11
1 files changed, 7 insertions, 4 deletions
diff --git a/src/widgets/styles/qfusionstyle.cpp b/src/widgets/styles/qfusionstyle.cpp
index c7158adf7b..638915b342 100644
--- a/src/widgets/styles/qfusionstyle.cpp
+++ b/src/widgets/styles/qfusionstyle.cpp
@@ -1088,10 +1088,13 @@ void QFusionStyle::drawControl(ControlElement element, const QStyleOption *optio
painter->translate(0.5, 0.5);
painter->setBrush(dimHighlight);
painter->drawRoundedRect(option->rect.adjusted(0, 0, -1, -1), 1, 1);
- QColor innerLine = Qt::white;
- innerLine.setAlpha(40);
- painter->setPen(innerLine);
- painter->drawRoundedRect(option->rect.adjusted(1, 1, -2, -2), 1, 1);
+ //when the rectangle we get is large enough, draw the inner rectangle.
+ if (option->rect.width() > 2 && option->rect.height() > 2) {
+ QColor innerLine = Qt::white;
+ innerLine.setAlpha(40);
+ painter->setPen(innerLine);
+ painter->drawRoundedRect(option->rect.adjusted(1, 1, -2, -2), 1, 1);
+ }
painter->restore();
}
break;