From cfca7fadd4228bb697bacd6e6364b7c384e4e98d Mon Sep 17 00:00:00 2001 From: Michail Vourlakos Date: Fri, 26 May 2017 20:38:55 +0300 Subject: [PATCH] dont paint items when shadow is activated --this way we gain a few cpu cycles because they are not painted when the item is painted through the Shadow qml item --- containment/package/contents/ui/applet/AppletItemWrapper.qml | 3 +++ plasmoid/package/contents/ui/task/TaskIconItem.qml | 1 + 2 files changed, 4 insertions(+) diff --git a/containment/package/contents/ui/applet/AppletItemWrapper.qml b/containment/package/contents/ui/applet/AppletItemWrapper.qml index c3ae164d4..5bd923bc3 100644 --- a/containment/package/contents/ui/applet/AppletItemWrapper.qml +++ b/containment/package/contents/ui/applet/AppletItemWrapper.qml @@ -379,6 +379,8 @@ Item{ anchors.topMargin: plasmoid.location === PlasmaCore.Types.TopEdge ? lowThickUsed : 0 anchors.bottomMargin: plasmoid.location === PlasmaCore.Types.BottomEdge ? lowThickUsed : 0 + opacity: appletShadow.active ? 0 : 1 + property int lowThickUsed: root.reverseLinesPosition ? root.thickMarginHigh : root.thickMarginBase //BEGIN states @@ -514,6 +516,7 @@ Item{ ///Shadow in applets Loader{ + id: appletShadow anchors.fill: container.appletWrapper active: container.applet diff --git a/plasmoid/package/contents/ui/task/TaskIconItem.qml b/plasmoid/package/contents/ui/task/TaskIconItem.qml index 250adc3b4..44cb35e4c 100644 --- a/plasmoid/package/contents/ui/task/TaskIconItem.qml +++ b/plasmoid/package/contents/ui/task/TaskIconItem.qml @@ -120,6 +120,7 @@ Item{ width: parent.width height: parent.height + opacity: root.enableShadows ? 0 : 1 //fix bug #478, when changing form factor sometimes the tasks are not positioned //correctly, in such case we make a fast reinitialization for the sizes