From 045527ed8a9dbe68240d26cd024e93d3112017d4 Mon Sep 17 00:00:00 2001 From: Vitaly Fanaskov Date: Thu, 18 Jul 2019 10:51:31 +0200 Subject: Remove redundant code Reasons: 1) Qt::TexturePattern has never set by any code (this branch is unreachable); 2) There is no knowleage about any brushes in QML (this method is supposed to be invoked from QML only). Palette is used for colors only; 3) Even if brush style has been set somehow, it will be erased during palettes resolving process after assigning a new "window color". Looks like this code was copied from widgets styling and has been compiling only because of the current design. In light of redesigning palette class this code also makes no sense. Bringing knowledge about brushes and its styles to QML requires additional job. Change-Id: I555d062335593ad945b024136750dcd548cd9f16 Reviewed-by: Mitch Curtis Reviewed-by: Nils Jeisecke --- src/imports/controls/fusion/qquickfusionstyle.cpp | 4 ---- 1 file changed, 4 deletions(-) (limited to 'src/imports/controls') diff --git a/src/imports/controls/fusion/qquickfusionstyle.cpp b/src/imports/controls/fusion/qquickfusionstyle.cpp index 7797463a..364f8a75 100644 --- a/src/imports/controls/fusion/qquickfusionstyle.cpp +++ b/src/imports/controls/fusion/qquickfusionstyle.cpp @@ -80,8 +80,6 @@ QColor QQuickFusionStyle::highlightedText(const QPalette &palette) QColor QQuickFusionStyle::outline(const QPalette &palette) { - if (palette.window().style() == Qt::TexturePattern) - return QColor(0, 0, 0, 160); return palette.window().color().darker(140); } @@ -95,8 +93,6 @@ QColor QQuickFusionStyle::highlightedOutline(const QPalette &palette) QColor QQuickFusionStyle::tabFrameColor(const QPalette &palette) { - if (palette.window().style() == Qt::TexturePattern) - return QColor(255, 255, 255, 8); return buttonColor(palette).lighter(104); } -- cgit v1.2.3