Skip to content
Snippets Groups Projects
Commit 3afc7acd authored by Pospelov, Gennady's avatar Pospelov, Gennady
Browse files

Fix for deprecated color methods in 5.13

parent 699c6be5
No related branches found
No related tags found
No related merge requests found
......@@ -28,9 +28,15 @@ QGradient DesignerHelper::getLayerGradient(const QColor &color, const QRectF &re
QColor c = color;
c.setAlpha(160);
QLinearGradient result(rect.topLeft(), rect.bottomRight());
#if QT_VERSION >= QT_VERSION_CHECK(5, 13, 0)
result.setColorAt(0, c.darker(150));
result.setColorAt(0.5, c.lighter(200));
result.setColorAt(1, c.darker(150));
#else
result.setColorAt(0, c.dark(150));
result.setColorAt(0.5, c.light(200));
result.setColorAt(1, c.dark(150));
#endif
return result;
}
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment