1
0
mirror of https://github.com/KDE/latte-dock.git synced 2025-03-09 00:58:15 +03:00

plasmoid:fix monochromized icons implementation

This commit is contained in:
Michail Vourlakos 2021-05-17 22:00:53 +03:00
parent f2e46382c3
commit 117d68749b
4 changed files with 17 additions and 13 deletions

View File

@ -106,6 +106,7 @@ Item{
property Item abilities: null
property Item contentItem: null
property Item monochromizedItem: null
readonly property bool isHorizontal: !isVertical
readonly property bool isVertical: plasmoid.formFactor === PlasmaCore.Types.Vertical

View File

@ -190,21 +190,21 @@ Item{
}
}
}
//! Latte Side Painting-style if the user chose it
Loader{
anchors.fill: _contentItemContainer
active: abilityItem.isMonochromaticForcedContentItem
sourceComponent: ColorOverlay {
anchors.fill: parent
color: latteBridge ? latteBridge.palette.textColor : "transparent"
source: _contentItemContainer.contentItem
}
}
//! Latte Side Painting-style if the user chose it
} //_contentItemContainer
//! Latte Side Painting-style if the user chose it
Loader{
anchors.fill: _contentItemContainer
active: abilityItem.isMonochromaticForcedContentItem && abilityItem.monochromizedItem
sourceComponent: ColorOverlay {
anchors.fill: parent
color: latteBridge ? latteBridge.palette.textColor : "transparent"
source: abilityItem.monochromizedItem
}
}
//! Latte Side Painting-style if the user chose it
ShortcutBadge{
id: shortcutBadge
anchors.centerIn: parent

View File

@ -45,6 +45,8 @@ Item {
readonly property real progress: smartLauncherItem && smartLauncherItem.progress ? smartLauncherItem.progress : 0
readonly property QtObject smartLauncherItem: smartLauncherLoader.active ? smartLauncherLoader.item : null
readonly property Item monochromizedItem: badgesLoader.active ? badgesLoader.item : taskIconItem
Rectangle{
id: draggedRectangle
width: parent.width + 2

View File

@ -50,6 +50,7 @@ AbilityItem.BasicItem {
|| (taskItem.containsMouse && inAttentionAnimation && taskItem.parabolicItem.zoom!==taskItem.abilities.parabolic.factor.zoom)
isMonochromaticForcedContentItem: plasmoid.configuration.forceMonochromaticIcons
monochromizedItem: taskIcon.monochromizedItem
isSeparatorHidden: isSeparator && (lastValidIndex > taskItem.abilities.indexer.lastVisibleItemIndex)
isSeparatorInRealLength: isSeparator && root.dragSource