diff options
Diffstat (limited to 'src/widgets/styles/qfusionstyle.cpp')
-rw-r--r-- | src/widgets/styles/qfusionstyle.cpp | 5 |
1 files changed, 4 insertions, 1 deletions
diff --git a/src/widgets/styles/qfusionstyle.cpp b/src/widgets/styles/qfusionstyle.cpp index a5fc4eb3a2..6d722c680b 100644 --- a/src/widgets/styles/qfusionstyle.cpp +++ b/src/widgets/styles/qfusionstyle.cpp @@ -209,7 +209,10 @@ static QPixmap colorizedImage(const QString &fileName, const QColor &color, int unsigned char green = gray + qt_div_255(sourceGreen * colorDiff); unsigned char blue = gray + qt_div_255(sourceBlue * colorDiff); unsigned char alpha = qt_div_255(qAlpha(col) * qAlpha(source)); - data[x] = qRgba(red, green, blue, alpha); + data[x] = qRgba(std::min(alpha, red), + std::min(alpha, green), + std::min(alpha, blue), + alpha); } } if (rotation != 0) { |