From 4caa37e7c35d4128e36e94b7a67ca0d267d2b008 Mon Sep 17 00:00:00 2001 From: Orgad Shaneh Date: Tue, 30 Jun 2015 22:42:14 +0300 Subject: [PATCH] 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 --- src/plugins/coreplugin/manhattanstyle.cpp | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/src/plugins/coreplugin/manhattanstyle.cpp b/src/plugins/coreplugin/manhattanstyle.cpp index 5d66ec78fd3..ab76a278f72 100644 --- a/src/plugins/coreplugin/manhattanstyle.cpp +++ b/src/plugins/coreplugin/manhattanstyle.cpp @@ -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());