Theming: Use a light shade for pressed toolbuttons in dark theme

With the dark theme, it is very hard to distinguish between normal and pressed
toolbuttons.

Change-Id: Ic5baaa3f5a8651e19ebdfd8dad08904dc0ef0820
Reviewed-by: Alessandro Portale <alessandro.portale@theqtcompany.com>
This commit is contained in:
Orgad Shaneh
2015-06-30 22:42:14 +03:00
committed by Orgad Shaneh
parent 11d79e4f23
commit 4caa37e7c3

View File

@@ -490,7 +490,8 @@ void ManhattanStyle::drawPrimitive(PrimitiveElement element, const QStyleOption
QColor shadow(0, 0, 0, 30);
painter->setPen(shadow);
if (pressed) {
QColor shade(0, 0, 0, 40);
QColor shade = option->palette.base().color();
shade.setHsv(shade.hue(), shade.saturation(), 255 - shade.value(), 40);
painter->fillRect(rect, shade);
painter->drawLine(rect.topLeft() + QPoint(1, 0), rect.topRight() - QPoint(1, 0));
painter->drawLine(rect.topLeft(), rect.bottomLeft());