From f09a6e00260a56c80314a18e7c2454e11a0ffb66 Mon Sep 17 00:00:00 2001 From: Michail Vourlakos Date: Wed, 27 Jan 2021 19:25:26 +0200 Subject: [PATCH] expose items shadow through MyView Ability --- .../package/contents/ui/abilities/MyView.qml | 11 +++- .../ui/abilities/privates/MetricsPrivate.qml | 4 +- .../ui/abilities/privates/MyViewPrivate.qml | 55 +++++++++++++++++++ .../package/contents/ui/applet/AppletItem.qml | 2 +- .../contents/ui/applet/ItemWrapper.qml | 6 +- .../contents/ui/applet/ShortcutBadge.qml | 6 +- .../contents/ui/applet/colorizer/Applet.qml | 4 +- .../contents/ui/editmode/ConfigOverlay.qml | 4 +- .../ui/layouts/EnvironmentActions.qml | 2 +- containment/package/contents/ui/main.qml | 33 +---------- .../abilities/client/MyView.qml | 4 ++ .../abilities/definition/MyView.qml | 11 ++++ .../definition/myview/ItemShadow.qml | 28 ++++++++++ declarativeimports/abilities/host/MyView.qml | 4 ++ plasmoid/package/contents/ui/main.qml | 8 +-- .../package/contents/ui/task/IconItem.qml | 22 ++++---- .../contents/ui/task/ProgressOverlay.qml | 2 +- .../contents/ui/task/ShortcutBadge.qml | 6 +- .../package/contents/ui/task/TaskItem.qml | 8 +-- .../RemoveWindowFromGroupAnimation.qml | 4 +- .../ui/taskslayout/ScrollEdgeShadows.qml | 2 +- 21 files changed, 151 insertions(+), 75 deletions(-) create mode 100644 containment/package/contents/ui/abilities/privates/MyViewPrivate.qml create mode 100644 declarativeimports/abilities/definition/myview/ItemShadow.qml diff --git a/containment/package/contents/ui/abilities/MyView.qml b/containment/package/contents/ui/abilities/MyView.qml index e9189740c..d6a2ccbdd 100644 --- a/containment/package/contents/ui/abilities/MyView.qml +++ b/containment/package/contents/ui/abilities/MyView.qml @@ -22,9 +22,9 @@ import org.kde.plasma.plasmoid 2.0 import org.kde.latte.core 0.2 as LatteCore -import org.kde.latte.abilities.host 0.1 as AbilityHost +import "./privates" as Ability -AbilityHost.MyView { +Ability.MyViewPrivate { view: latteView isReady: latteView @@ -45,7 +45,14 @@ AbilityHost.MyView { lastUsedActivity: view && view.layout ? view.layout.lastUsedActivity : "" + screenGeometry: view ? view.screenGeometry : plasmoid.screenGeometry + containmentActions: isReady ? view.containmentActions : [] + + itemShadow.isEnabled: plasmoid.configuration.appletShadowsEnabled + itemShadow.size: itemShadow.isEnabled ? (0.5*metrics.iconSize) * (plasmoid.configuration.shadowSize/100) : 0 + itemShadow.shadowColor: "#" + myView.decimalToHex(appShadowOpacity) + myView.itemShadowOpacity + itemShadow.shadowSolidColor: "#" + myView.itemShadowCurrentColor } diff --git a/containment/package/contents/ui/abilities/privates/MetricsPrivate.qml b/containment/package/contents/ui/abilities/privates/MetricsPrivate.qml index b643affff..aeb935ee6 100644 --- a/containment/package/contents/ui/abilities/privates/MetricsPrivate.qml +++ b/containment/package/contents/ui/abilities/privates/MetricsPrivate.qml @@ -72,7 +72,7 @@ AbilityHost.Metrics { } //! 45% of max shadow size in px. - var shadowMaxNeededMargin = 0.45 * root.appShadowSizeOriginal; + var shadowMaxNeededMargin = 0.45 * root.myView.itemShadow.maxSize; var shadowOpacity = (plasmoid.configuration.shadowOpacity) / 100; //! +40% of shadow opacity in percentage shadowOpacity = shadowOpacity + shadowOpacity*0.4; @@ -82,7 +82,7 @@ AbilityHost.Metrics { shadowMaxNeededMargin = (shadowMaxNeededMargin * shadowOpacity); //! give some more space when items shadows are enabled and extremely big - if (root.enableShadows && metrics.margin.maxThickness < shadowMaxNeededMargin) { + if (root.myView.itemShadow.isEnabled && metrics.margin.maxThickness < shadowMaxNeededMargin) { return shadowMaxNeededMargin - metrics.margin.maxThickness; } diff --git a/containment/package/contents/ui/abilities/privates/MyViewPrivate.qml b/containment/package/contents/ui/abilities/privates/MyViewPrivate.qml new file mode 100644 index 000000000..39bf01b68 --- /dev/null +++ b/containment/package/contents/ui/abilities/privates/MyViewPrivate.qml @@ -0,0 +1,55 @@ +/* +* Copyright 2021 Michail Vourlakos +* +* This file is part of Latte-Dock +* +* Latte-Dock is free software; you can redistribute it and/or +* modify it under the terms of the GNU General Public License as +* published by the Free Software Foundation; either version 2 of +* the License, or (at your option) any later version. +* +* Latte-Dock is distributed in the hope that it will be useful, +* but WITHOUT ANY WARRANTY; without even the implied warranty of +* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +* GNU General Public License for more details. +* +* You should have received a copy of the GNU General Public License +* along with this program. If not, see . +*/ + +import QtQuick 2.7 +import org.kde.plasma.plasmoid 2.0 + +import org.kde.latte.core 0.2 as LatteCore + +import org.kde.latte.abilities.host 0.1 as AbilityHost + +import org.kde.latte.private.containment 0.1 as LatteContainment + +AbilityHost.MyView { + readonly property int itemShadowOpacity: (plasmoid.configuration.shadowOpacity/100) * 255 + readonly property int itemShadowMaxSize: itemShadow.isEnabled ? (0.5*metrics.maxIconSize) * (plasmoid.configuration.shadowSize/100) : 0 + + readonly property string itemShadowCurrentColor: { + if (plasmoid.configuration.shadowColorType === LatteContainment.Types.ThemeColorShadow) { + var strC = String(theme.textColor); + return strC.indexOf("#") === 0 ? strC.substr(1) : strC; + } else if (plasmoid.configuration.shadowColorType === LatteContainment.Types.UserColorShadow) { + return plasmoid.configuration.shadowColor; + } + + return "080808"; // default + } + + function decimalToHex(d, padding) { + var hex = Number(d).toString(16); + padding = typeof (padding) === "undefined" || padding === null ? padding = 2 : padding; + + while (hex.length < padding) { + hex = "0" + hex; + } + + return hex; + } +} + diff --git a/containment/package/contents/ui/applet/AppletItem.qml b/containment/package/contents/ui/applet/AppletItem.qml index 7d36a6bf0..ca089a428 100644 --- a/containment/package/contents/ui/applet/AppletItem.qml +++ b/containment/package/contents/ui/applet/AppletItem.qml @@ -772,7 +772,7 @@ Item { scaleFactor: appletItem.wrapper.zoomScale panelOpacity: root.background.currentOpacity - shadowColor: root.appShadowColorSolid + shadowColor: appletItem.myView.itemShadow.shadowSolidColor palette: colorizerManager.applyTheme diff --git a/containment/package/contents/ui/applet/ItemWrapper.qml b/containment/package/contents/ui/applet/ItemWrapper.qml index 74387eb12..7b8336300 100644 --- a/containment/package/contents/ui/applet/ItemWrapper.qml +++ b/containment/package/contents/ui/applet/ItemWrapper.qml @@ -584,7 +584,7 @@ Item{ active: appletItem.applet && graphicsSystem.isAccelerated && !appletColorizer.mustBeShown - && (root.enableShadows && applet.pluginName !== root.plasmoidName) + && (appletItem.myView.itemShadow.isEnabled && !appletItem.communicator.indexerIsSupported) onActiveChanged: { if (active && !isSeparator && graphicsSystem.isAccelerated) { @@ -598,14 +598,14 @@ Item{ sourceComponent: DropShadow{ anchors.fill: parent - color: root.appShadowColor //"#ff080808" + color: appletItem.myView.itemShadow.shadowColor fast: true samples: 2 * radius source: appletItem.applet radius: shadowSize verticalOffset: root.forceTransparentPanel || root.forcePanelForBusyBackground ? 0 : 2 - property int shadowSize : root.appShadowSize + property int shadowSize : appletItem.myView.itemShadow.size } } diff --git a/containment/package/contents/ui/applet/ShortcutBadge.qml b/containment/package/contents/ui/applet/ShortcutBadge.qml index 6b8611047..6a43ed48d 100644 --- a/containment/package/contents/ui/applet/ShortcutBadge.qml +++ b/containment/package/contents/ui/applet/ShortcutBadge.qml @@ -80,14 +80,14 @@ Loader{ sourceComponent: Item{ Loader{ anchors.fill: appletNumber - active: root.enableShadows && graphicsSystem.isAccelerated + active: appletItem.myView.itemShadow.isEnabled && graphicsSystem.isAccelerated sourceComponent: DropShadow{ - color: root.appShadowColor + color: appletItem.myView.itemShadow.shadowColor fast: true samples: 2 * radius source: appletNumber - radius: root.appShadowSize/2 + radius: appletItem.myView.itemShadow.size/2 verticalOffset: 2 } } diff --git a/containment/package/contents/ui/applet/colorizer/Applet.qml b/containment/package/contents/ui/applet/colorizer/Applet.qml index d047612fa..9175189b7 100644 --- a/containment/package/contents/ui/applet/colorizer/Applet.qml +++ b/containment/package/contents/ui/applet/colorizer/Applet.qml @@ -40,14 +40,14 @@ Item { sourceComponent: DropShadow{ anchors.fill: parent - color: root.appShadowColor + color: appletItem.myView.itemShadow.shadowColor fast: true samples: 2 * radius source: colorizer radius: shadowSize verticalOffset: forcedShadow ? 0 : 2 - readonly property int shadowSize : root.appShadowSize + readonly property int shadowSize : appletItem.myView.itemShadow.size readonly property bool forcedShadow: root.forceTransparentPanel && plasmoid.configuration.appletShadowsEnabled && applet && applet.pluginName !== root.plasmoidName ? true : false diff --git a/containment/package/contents/ui/editmode/ConfigOverlay.qml b/containment/package/contents/ui/editmode/ConfigOverlay.qml index 4765972a4..e92779220 100644 --- a/containment/package/contents/ui/editmode/ConfigOverlay.qml +++ b/containment/package/contents/ui/editmode/ConfigOverlay.qml @@ -418,10 +418,10 @@ MouseArea { opacity: 0.9 layer.enabled: graphicsSystem.isAccelerated layer.effect: DropShadow { - radius: root.appShadowSize + radius: root.myView.itemShadow.size fast: true samples: 2 * radius - color: root.appShadowColor + color: root.myView.itemShadow.shadowColor verticalOffset: 2 } diff --git a/containment/package/contents/ui/layouts/EnvironmentActions.qml b/containment/package/contents/ui/layouts/EnvironmentActions.qml index e33bfd7b1..e5f3d8159 100644 --- a/containment/package/contents/ui/layouts/EnvironmentActions.qml +++ b/containment/package/contents/ui/layouts/EnvironmentActions.qml @@ -227,7 +227,7 @@ Loader { isEmptySpace: true isPressed: mainArea.pressed panelOpacity: root.background.currentOpacity - shadowColor: root.appShadowColorSolid + shadowColor: root.myView.itemShadow.shadowSolidColor palette: colorizerManager.applyTheme iconBackgroundColor: "brown" diff --git a/containment/package/contents/ui/main.qml b/containment/package/contents/ui/main.qml index 0ef769780..75337b18b 100644 --- a/containment/package/contents/ui/main.qml +++ b/containment/package/contents/ui/main.qml @@ -250,7 +250,7 @@ Item { property int scrollAction: plasmoid.configuration.scrollAction property bool panelOutline: plasmoid.configuration.panelOutline - property int panelEdgeSpacing: Math.max(background.lengthMargins, 1.5*appShadowSize) + property int panelEdgeSpacing: Math.max(background.lengthMargins, 1.5*myView.itemShadow.size) property int panelTransparency: plasmoid.configuration.panelTransparency //user set property bool backgroundShadowsInRegularStateEnabled: LatteCore.WindowSystem.compositingActive @@ -293,25 +293,6 @@ Item { return false; } - property int appShadowOpacity: (plasmoid.configuration.shadowOpacity/100) * 255 - property int appShadowSize: enableShadows ? (0.5*metrics.iconSize) * (plasmoid.configuration.shadowSize/100) : 0 - property int appShadowSizeOriginal: enableShadows ? (0.5*metrics.maxIconSize) * (plasmoid.configuration.shadowSize/100) : 0 - - property string appChosenShadowColor: { - if (plasmoid.configuration.shadowColorType === LatteContainment.Types.ThemeColorShadow) { - var strC = String(theme.textColor); - return strC.indexOf("#") === 0 ? strC.substr(1) : strC; - } else if (plasmoid.configuration.shadowColorType === LatteContainment.Types.UserColorShadow) { - return plasmoid.configuration.shadowColor; - } - - // default shadow color - return "080808"; - } - - property string appShadowColor: "#" + decimalToHex(appShadowOpacity) + appChosenShadowColor - property string appShadowColorSolid: "#" + appChosenShadowColor - property int offset: { if (behaveAsPlasmaPanel) { return 0; @@ -388,7 +369,6 @@ Item { ///BEGIN properties provided to Latte Plasmoid //shadows for applets, it should be removed as the appleitems don't need it any more property bool badges3DStyle: universalSettings ? universalSettings.badges3DStyle : true - property bool enableShadows: plasmoid.configuration.appletShadowsEnabled property bool titleTooltips: { if (behaveAsPlasmaPanel) { @@ -840,17 +820,6 @@ Item { } } - function decimalToHex(d, padding) { - var hex = Number(d).toString(16); - padding = typeof (padding) === "undefined" || padding === null ? padding = 2 : padding; - - while (hex.length < padding) { - hex = "0" + hex; - } - - return hex; - } - function internalViewSplittersCount(){ var splitters = 0; for (var container in layoutsContainer.startLayout.children) { diff --git a/declarativeimports/abilities/client/MyView.qml b/declarativeimports/abilities/client/MyView.qml index d808f919c..9bf043599 100644 --- a/declarativeimports/abilities/client/MyView.qml +++ b/declarativeimports/abilities/client/MyView.qml @@ -42,8 +42,12 @@ AbilityDefinition.MyView { lastUsedActivity: ref.myView.lastUsedActivity + screenGeometry: ref.myView.screenGeometry + containmentActions: ref.myView.containmentActions + itemShadow: ref.myView.itemShadow + readonly property AbilityDefinition.MyView local: AbilityDefinition.MyView {} Item { diff --git a/declarativeimports/abilities/definition/MyView.qml b/declarativeimports/abilities/definition/MyView.qml index edc1fef03..5ef1c726c 100644 --- a/declarativeimports/abilities/definition/MyView.qml +++ b/declarativeimports/abilities/definition/MyView.qml @@ -21,6 +21,8 @@ import QtQuick 2.0 import org.kde.latte.core 0.2 as LatteCore +import "./myview" as MyViewTypes + Item { property bool isReady: false @@ -40,7 +42,16 @@ Item { property string lastUsedActivity: "" + property rect screenGeometry: Qt.rect(0, 0, 1600, 1080) + property var containmentActions: [] + property MyViewTypes.ItemShadow itemShadow: MyViewTypes.ItemShadow { + isEnabled: true + size: 6 + shadowColor: "#ff080808" + shadowSolidColor: "#ff080808" + } + //function inCurrentLayout(); } diff --git a/declarativeimports/abilities/definition/myview/ItemShadow.qml b/declarativeimports/abilities/definition/myview/ItemShadow.qml new file mode 100644 index 000000000..2e9830e9b --- /dev/null +++ b/declarativeimports/abilities/definition/myview/ItemShadow.qml @@ -0,0 +1,28 @@ +/* +* Copyright 2021 Michail Vourlakos +* +* This file is part of Latte-Dock +* +* Latte-Dock is free software; you can redistribute it and/or +* modify it under the terms of the GNU General Public License as +* published by the Free Software Foundation; either version 2 of +* the License, or (at your option) any later version. +* +* Latte-Dock is distributed in the hope that it will be useful, +* but WITHOUT ANY WARRANTY; without even the implied warranty of +* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +* GNU General Public License for more details. +* +* You should have received a copy of the GNU General Public License +* along with this program. If not, see . +*/ + +import QtQuick 2.7 + +Item { + property bool isEnabled: true + + property int size: 6 + property string shadowColor: "#ff080808" + property string shadowSolidColor: "#ff080808" +} diff --git a/declarativeimports/abilities/host/MyView.qml b/declarativeimports/abilities/host/MyView.qml index b4b841202..15b92b7b3 100644 --- a/declarativeimports/abilities/host/MyView.qml +++ b/declarativeimports/abilities/host/MyView.qml @@ -47,8 +47,12 @@ AbilityDefinition.MyView { readonly property alias alignment: apis.alignment readonly property alias visibilityMode: apis.visibilityMode + readonly property alias screenGeometry: apis.screenGeometry + readonly property alias containmentActions: apis.containmentActions + readonly property alias itemShadow: apis.itemShadow + function inCurrentLayout() { return apis.inCurrentLayout(); } diff --git a/plasmoid/package/contents/ui/main.qml b/plasmoid/package/contents/ui/main.qml index 166cfe5a7..001093bc4 100644 --- a/plasmoid/package/contents/ui/main.qml +++ b/plasmoid/package/contents/ui/main.qml @@ -128,7 +128,6 @@ Item { //BEGIN Latte Dock properties property bool badges3DStyle: latteView ? latteView.badges3DStyle : true - property bool enableShadows: latteView ? latteView.enableShadows > 0 : plasmoid.configuration.showShadows property bool forceHidePanel: false property bool disableLeftSpacer: false @@ -192,10 +191,6 @@ Item { readonly property real currentPanelOpacity: latteView ? latteView.currentPanelTransparency / 100 : 1 - property int appShadowSize: latteView ? latteView.appShadowSize : Math.ceil(0.12*appletAbilities.metrics.iconSize) - property string appShadowColor: latteView ? latteView.appShadowColor : "#ff080808" - property string appShadowColorSolid: latteView ? latteView.appShadowColorSolid : "#ff080808" - property alias tasksCount: tasksModel.count readonly property real screenGeometryHeightRatio: screenGeometry.height / screenGeometry.width @@ -750,6 +745,9 @@ Item { launchers.isStealingDroppedLaunchers: plasmoid.configuration.isPreferredForDroppedLaunchers launchers.syncer.isBlocked: inDraggingPhase + myView.local.itemShadow.isEnabled: plasmoid.configuration.showShadows + myView.local.itemShadow.size: Math.ceil(0.12*appletAbilities.metrics.iconSize) + parabolic.itemsCount: tasksModel.count parabolic.local.isEnabled: parabolic.factor.zoom > 1 parabolic.local.restoreZoomIsBlocked: root.contextMenu || windowsPreviewDlg.containsMouse diff --git a/plasmoid/package/contents/ui/task/IconItem.qml b/plasmoid/package/contents/ui/task/IconItem.qml index 9b8dfa967..28232da0b 100644 --- a/plasmoid/package/contents/ui/task/IconItem.qml +++ b/plasmoid/package/contents/ui/task/IconItem.qml @@ -60,7 +60,7 @@ Item{ // property int shadowInterval: firstDrawed ? firstDrawedInterval : 250 property int shadowInterval: firstDrawed ? 1000 : 250 - property int shadowSize : root.appShadowSize + property int shadowSize : taskItem.abilities.myView.itemShadow.size readonly property bool smartLauncherEnabled: ((taskItem.isStartup === false) && (root.showInfoBadge || root.showProgressBadge)) readonly property variant iconDecoration: decoration @@ -162,7 +162,7 @@ Item{ smooth: taskItem.abilities.parabolic.factor.zoom === 1 ? true : false providesColors: taskItem.abilities.indicators.info.needsIconColors - opacity: root.enableShadows + opacity: taskItem.abilities.myView.itemShadow.isEnabled && taskWithShadow.active && graphicsSystem.isAccelerated ? 0 : 1 visible: !taskItem.isSeparator && (!badgesLoader.active || !graphicsSystem.isAccelerated) @@ -262,15 +262,15 @@ Item{ Loader{ id: taskWithShadow anchors.fill: iconImageBuffer - active: root.enableShadows && !taskItem.isSeparator && graphicsSystem.isAccelerated + active: taskItem.abilities.myView.itemShadow.isEnabled && !taskItem.isSeparator && graphicsSystem.isAccelerated sourceComponent: DropShadow{ anchors.fill: parent - color: root.appShadowColor + color: taskItem.abilities.myView.itemShadow.shadowColor fast: true samples: 2 * radius source: badgesLoader.active ? badgesLoader.item : iconImageBuffer - radius: root.appShadowSize + radius: taskItem.abilities.myView.itemShadow.size verticalOffset: 2 } } @@ -458,13 +458,13 @@ Item{ opacity: badgesLoader.activateProgress visible: badgesLoader.showInfo || badgesLoader.showProgress - layer.enabled: root.enableShadows && graphicsSystem.isAccelerated + layer.enabled: taskItem.abilities.myView.itemShadow.isEnabled && graphicsSystem.isAccelerated layer.effect: DropShadow { - color: root.appShadowColor + color: taskItem.abilities.myView.itemShadow.shadowColor fast: true samples: 2 * radius source: infoBadge - radius: root.appShadowSize + radius: taskItem.abilities.myView.itemShadow.size verticalOffset: 2 } } @@ -475,13 +475,13 @@ Item{ opacity: badgesLoader.activateProgress visible: badgesLoader.showAudio - layer.enabled: root.enableShadows && graphicsSystem.isAccelerated + layer.enabled: taskItem.abilities.myView.itemShadow.isEnabled && graphicsSystem.isAccelerated layer.effect: DropShadow { - color: root.appShadowColor + color: taskItem.abilities.myView.itemShadow.shadowColor fast: true samples: 2 * radius source: audioStreamBadge - radius: root.appShadowSize + radius: taskItem.abilities.myView.itemShadow.size verticalOffset: 2 } } diff --git a/plasmoid/package/contents/ui/task/ProgressOverlay.qml b/plasmoid/package/contents/ui/task/ProgressOverlay.qml index 144c5588a..daeab108c 100644 --- a/plasmoid/package/contents/ui/task/ProgressOverlay.qml +++ b/plasmoid/package/contents/ui/task/ProgressOverlay.qml @@ -63,7 +63,7 @@ Item { if (showsAudioBadge) { return height; } else if ( index === taskItem.abilities.indexer.firstVisibleItemIndex && !taskItem.containsMouse) { - return (wrapper.mScale * (taskItem.abilities.metrics.iconSize - (root.enableShadows ? shadowSize/2 : 0))); + return (wrapper.mScale * (taskItem.abilities.metrics.iconSize - (taskItem.abilities.myView.itemShadow.isEnabled ? shadowSize/2 : 0))); } else { return 999999; } diff --git a/plasmoid/package/contents/ui/task/ShortcutBadge.qml b/plasmoid/package/contents/ui/task/ShortcutBadge.qml index ecbcc0f5a..6e3cd2e05 100644 --- a/plasmoid/package/contents/ui/task/ShortcutBadge.qml +++ b/plasmoid/package/contents/ui/task/ShortcutBadge.qml @@ -51,14 +51,14 @@ Loader{ sourceComponent: Item{ Loader{ anchors.fill: taskNumber - active: root.enableShadows && graphicsSystem.isAccelerated + active: taskItem.abilities.myView.itemShadow.isEnabled && graphicsSystem.isAccelerated sourceComponent: DropShadow{ - color: root.appShadowColor + color: taskItem.abilities.myView.itemShadow.shadowColor fast: true samples: 2 * radius source: taskNumber - radius: root.appShadowSize/2 + radius: taskItem.abilities.myView.itemShadow.size/2 verticalOffset: 2 } } diff --git a/plasmoid/package/contents/ui/task/TaskItem.qml b/plasmoid/package/contents/ui/task/TaskItem.qml index e4cbb93ef..ed2ebaa9b 100644 --- a/plasmoid/package/contents/ui/task/TaskItem.qml +++ b/plasmoid/package/contents/ui/task/TaskItem.qml @@ -462,7 +462,7 @@ Item { Loader{ id: separatorShadow anchors.fill: separatorItem - active: root.enableShadows && isSeparator && graphicsSystem.isAccelerated + active: taskItem.abilities.myView.itemShadow.isEnabled && isSeparator && graphicsSystem.isAccelerated opacity: separatorItem.forceHiddenState ? 0 : 0.4 Behavior on opacity { @@ -471,11 +471,11 @@ Item { sourceComponent: DropShadow{ anchors.fill: parent - color: root.appShadowColor + color: taskItem.abilities.myView.itemShadow.shadowColor fast: true samples: 2 * radius source: separatorItem - radius: root.appShadowSize + radius: taskItem.abilities.myView.itemShadow.size verticalOffset: 2 } } @@ -538,7 +538,7 @@ Item { scaleFactor: taskItem.wrapper.mScale panelOpacity: root.currentPanelOpacity - shadowColor: root.appShadowColorSolid + shadowColor: taskItem.abilities.myView.itemShadow.shadowColorSolid progressVisible: wrapper.progressVisible /*since 0.9.2*/ progress: wrapper.progress /*since 0.9.2*/ diff --git a/plasmoid/package/contents/ui/task/animations/RemoveWindowFromGroupAnimation.qml b/plasmoid/package/contents/ui/task/animations/RemoveWindowFromGroupAnimation.qml index ef8b6b336..b77abe6b7 100644 --- a/plasmoid/package/contents/ui/task/animations/RemoveWindowFromGroupAnimation.qml +++ b/plasmoid/package/contents/ui/task/animations/RemoveWindowFromGroupAnimation.qml @@ -81,7 +81,7 @@ Item{ width: iconImageBuffer.width height: width - visible: root.enableShadows ? false : true + visible: taskItem.abilities.myView.itemShadow.isEnabled ? false : true source: iconImageBuffer.lastValidSourceName } @@ -89,7 +89,7 @@ Item{ Loader{ id: tempTaskShadow anchors.fill: tempRemoveIcon - active: root.enableShadows && graphicsSystem.isAccelerated + active: taskItem.abilities.myView.itemShadow.isEnabled && graphicsSystem.isAccelerated sourceComponent: DropShadow{ anchors.fill: parent diff --git a/plasmoid/package/contents/ui/taskslayout/ScrollEdgeShadows.qml b/plasmoid/package/contents/ui/taskslayout/ScrollEdgeShadows.qml index 2744c2765..957bb6a2a 100644 --- a/plasmoid/package/contents/ui/taskslayout/ScrollEdgeShadows.qml +++ b/plasmoid/package/contents/ui/taskslayout/ScrollEdgeShadows.qml @@ -28,7 +28,7 @@ Item { readonly property int gradientLength: appletAbilities.metrics.iconSize / 3 readonly property int thickness: appletAbilities.metrics.backgroundThickness - readonly property color appliedColor: root.appShadowColorSolid + readonly property color appliedColor: root.abilities.myView.itemShadow.shadowSolidColor property Item flickable