From 2866b6a3aadaf06506b4d24af30c40fd4584f553 Mon Sep 17 00:00:00 2001 From: Michail Vourlakos Date: Tue, 27 Aug 2019 15:54:02 +0300 Subject: [PATCH] plasma theme colors for !accelerated graphics --fix also how accelerated graphics are identified by using GraphicsInfo api --- containment/package/contents/ui/colorizer/Manager.qml | 4 ++++ containment/package/contents/ui/main.qml | 8 ++++---- plasmoid/package/contents/ui/main.qml | 8 ++++---- 3 files changed, 12 insertions(+), 8 deletions(-) diff --git a/containment/package/contents/ui/colorizer/Manager.qml b/containment/package/contents/ui/colorizer/Manager.qml index 669b9e76d..41e2e6296 100644 --- a/containment/package/contents/ui/colorizer/Manager.qml +++ b/containment/package/contents/ui/colorizer/Manager.qml @@ -71,6 +71,10 @@ Loader{ && latteView.windowsTracker.currentScreen.touchingWindowScheme) property QtObject applyTheme: { + if (!graphicsSystem.isAccelerated) { + return theme; + } + if (latteView && latteView.windowsTracker && !root.hasExpandedApplet) { if (root.windowColors === Latte.Types.ActiveWindowColors && selectedWindowsTracker.activeWindowScheme) { return selectedWindowsTracker.activeWindowScheme; diff --git a/containment/package/contents/ui/main.qml b/containment/package/contents/ui/main.qml index 3459ba619..baf6edf52 100644 --- a/containment/package/contents/ui/main.qml +++ b/containment/package/contents/ui/main.qml @@ -18,7 +18,7 @@ * along with this program. If not, see . */ -import QtQuick 2.1 +import QtQuick 2.8 import QtQuick.Layouts 1.1 import QtQuick.Window 2.2 import QtGraphicalEffects 1.0 @@ -1711,10 +1711,10 @@ Item { id: indicators } - ShaderEffect { + Item { id: graphicsSystem - //! check if Software qml rendering is applied - readonly property bool isAccelerated: status === ShaderEffect.Compiled + readonly property bool isAccelerated: (GraphicsInfo.api !== GraphicsInfo.Software) + && (GraphicsInfo.api !== GraphicsInfo.Unknown) } ///////////////END components diff --git a/plasmoid/package/contents/ui/main.qml b/plasmoid/package/contents/ui/main.qml index 1e4fc29bc..815bf254a 100644 --- a/plasmoid/package/contents/ui/main.qml +++ b/plasmoid/package/contents/ui/main.qml @@ -18,7 +18,7 @@ * along with this program. If not, see . */ -import QtQuick 2.0 +import QtQuick 2.8 import QtQuick.Layouts 1.1 import QtGraphicalEffects 1.0 @@ -377,10 +377,10 @@ Item { } //! - ShaderEffect { + Item { id: graphicsSystem - //! check if Software qml rendering is applied - readonly property bool isAccelerated: status === ShaderEffect.Compiled + readonly property bool isAccelerated: (GraphicsInfo.api !== GraphicsInfo.Software) + && (GraphicsInfo.api !== GraphicsInfo.Unknown) } Loader {