Members of the KDE Community are recommended to subscribe to the kde-community mailing list at https://mail.kde.org/mailman/listinfo/kde-community to allow them to participate in important discussions and receive other important announcements

Commit ed4367d8 authored by Jan Przybylak's avatar Jan Przybylak Committed by Nate Graham

Remove the background gradient from icon view

Summary:
The icon view showed a very faint gradient in the background. It looked weird, broken and not really like a gradient for some reason. I think it looks better now.
There are some screenshots attached to the bug report.

BUG: 342938
FIXED-IN: 5.15.0

Reviewers: #vdg, ngraham

Reviewed By: #vdg, ngraham

Subscribers: ngraham, plasma-devel

Tags: #plasma

Differential Revision: https://phabricator.kde.org/D16998
parent 4aa040fa
......@@ -48,50 +48,6 @@ void CategoryDrawer::drawCategory(const QModelIndex &index,
const int height = categoryHeight(index, option);
const bool leftToRight = painter->layoutDirection() == Qt::LeftToRight;
//BEGIN: decoration gradient
{
QPainterPath path(optRect.bottomLeft());
path.lineTo(QPoint(optRect.topLeft().x(), optRect.topLeft().y() - 3));
const QPointF topLeft(optRect.topLeft());
QRectF arc(topLeft, QSizeF(4, 4));
path.arcTo(arc, 180, -90);
path.lineTo(optRect.topRight());
path.lineTo(optRect.bottomRight());
path.lineTo(optRect.bottomLeft());
QColor window(option.palette.window().color());
const QColor base(option.palette.base().color());
window.setAlphaF(0.4);
QLinearGradient decoGradient1;
if (leftToRight) {
decoGradient1.setStart(optRect.topLeft());
decoGradient1.setFinalStop(optRect.bottomLeft());
} else {
decoGradient1.setStart(optRect.topRight());
decoGradient1.setFinalStop(optRect.bottomRight());
}
decoGradient1.setColorAt(0, window);
decoGradient1.setColorAt(1, Qt::transparent);
QLinearGradient decoGradient2;
if (leftToRight) {
decoGradient2.setStart(optRect.topLeft());
decoGradient2.setFinalStop(optRect.topRight());
} else {
decoGradient2.setStart(optRect.topRight());
decoGradient2.setFinalStop(optRect.topLeft());
}
decoGradient2.setColorAt(0, Qt::transparent);
decoGradient2.setColorAt(1, base);
painter->fillPath(path, decoGradient1);
painter->fillPath(path, decoGradient2);
}
//END: decoration gradient
{
QRect newOptRect(optRect);
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment