provide palette through MyView Ability

work/spdx
Michail Vourlakos 4 years ago
parent 86f73e4135
commit 88f44f48c2

@ -19,6 +19,7 @@
import QtQuick 2.0
import org.kde.plasma.plasmoid 2.0
import org.kde.latte.abilities.definition 0.1 as AbilityDefinition
AbilityDefinition.MyView {
@ -52,6 +53,8 @@ AbilityDefinition.MyView {
itemShadow: ref.myView.itemShadow
palette: bridge && bridge.applyPalette ? bridge.palette : theme
readonly property AbilityDefinition.MyView local: AbilityDefinition.MyView {}
Item {

@ -19,6 +19,8 @@
import QtQuick 2.0
import org.kde.plasma.plasmoid 2.0
import org.kde.latte.core 0.2 as LatteCore
import "./myview" as MyViewTypes
@ -50,6 +52,8 @@ Item {
property var containmentActions: []
property QtObject palette: theme
property MyViewTypes.ItemShadow itemShadow: MyViewTypes.ItemShadow {
isEnabled: true
size: 6

@ -57,6 +57,8 @@ AbilityDefinition.MyView {
readonly property alias itemShadow: apis.itemShadow
readonly property alias palette: apis.palette
function inCurrentLayout() {
return apis.inCurrentLayout();
}

@ -198,7 +198,6 @@ Item {
|| plasmoid.location === PlasmaCore.Types.RightEdge
|| plasmoid.location === PlasmaCore.Types.BottomEdge
|| plasmoid.location === PlasmaCore.Types.TopEdge)
readonly property bool enforceLattePalette: latteBridge && latteBridge.applyPalette && latteBridge.palette
readonly property bool latteInEditMode: latteBridge && latteBridge.inEditMode
//END Latte Dock Communicator

@ -215,7 +215,7 @@ Item{
anchors.centerIn: parent
width: plasmoid.formFactor === PlasmaCore.Types.Vertical ? abilityItem.abilities.metrics.iconSize - 4 : 1
height: plasmoid.formFactor === PlasmaCore.Types.Horizontal ? abilityItem.abilities.metrics.iconSize - 4 : 1
color: enforceLattePalette ? latteBridge.palette.textColor : theme.textColor
color: abilityItem.abilities.myView.palette.textColor
}
}

@ -178,7 +178,7 @@ AbilityBasicItem {
indicator.progressVisible: taskIcon.progressVisible /*since 0.9.2*/
indicator.progress: taskIcon.progress /*since 0.9.2*/
indicator.palette: root.enforceLattePalette ? latteBridge.palette.applyTheme : theme
indicator.palette: taskItem.abilities.myView.palette
indicator.iconBackgroundColor: taskIcon.backgroundColor
indicator.iconGlowColor: taskIcon.glowColor

Loading…
Cancel
Save