From ebddd02896709d5856dc73f1a4f1479133c7ed2f Mon Sep 17 00:00:00 2001 From: Timur Pocheptsov Date: Fri, 24 May 2019 14:32:51 +0200 Subject: QMacStyle - fix the separator's color in the Dark theme MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit It's too dark as it is now. Since there is no similar UI element in AppKit, we take the same color as the toolbar's handle has (looks OK-eysh with 'Dark' and there is no reason to have the separator with a color different from the bar handle, both elements essentialy are lines of dots). Fixes: QTBUG-72759 Change-Id: I28277f80174a1c4c0af17961aba8ed6135aa3189 Reviewed-by: Morten Johan Sørvig --- src/plugins/styles/mac/qmacstyle_mac.mm | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) (limited to 'src/plugins') diff --git a/src/plugins/styles/mac/qmacstyle_mac.mm b/src/plugins/styles/mac/qmacstyle_mac.mm index cf7cf18c17..ee5556ec9e 100644 --- a/src/plugins/styles/mac/qmacstyle_mac.mm +++ b/src/plugins/styles/mac/qmacstyle_mac.mm @@ -3152,7 +3152,9 @@ void QMacStyle::drawPrimitive(PrimitiveElement pe, const QStyleOption *opt, QPai theStroker.setCapStyle(Qt::FlatCap); theStroker.setDashPattern(QVector() << 1 << 2); path = theStroker.createStroke(path); - p->fillPath(path, QColor(0, 0, 0, 119)); + const auto dark = qt_mac_applicationIsInDarkMode() ? opt->palette.dark().color().darker() + : QColor(0, 0, 0, 119); + p->fillPath(path, dark); } break; case PE_FrameWindow: -- cgit v1.2.3