1
0
mirror of https://github.com/KDE/latte-dock.git synced 2025-01-27 06:03:51 +03:00

fixes for abilities

This commit is contained in:
Michail Vourlakos 2021-01-31 14:21:41 +02:00
parent ea489b3c7b
commit 76a08e6897
6 changed files with 15 additions and 8 deletions

View File

@ -20,6 +20,8 @@
import QtQuick 2.7
import org.kde.plasma.plasmoid 2.0
import org.kde.plasma.core 2.0 as PlasmaCore
import org.kde.latte.abilities.definition 0.1 as AbilityDefinition
AbilityDefinition.ParabolicEffect {

View File

@ -88,8 +88,11 @@ Item{
}
}
property bool isMonochromaticForcedContentItem: false
property bool isHiddenSpacerAnimated: true
property bool isHiddenSpacerVisible: false
property bool isHiddenSpacerForcedShow: false
property bool isHidden: false
property bool isSeparator: false
property bool isSeparatorInRealLength: false

View File

@ -30,7 +30,7 @@ Item{
visible: (rightSpacer ? index === abilityItem.abilities.indexer.lastVisibleItemIndex : index === abilityItem.abilities.indexer.firstVisibleItemIndex)
|| (separatorSpace > 0)
|| abilityItem.isHiddenSpacerVisible
|| abilityItem.isHiddenSpacerForcedShow
property bool neighbourSeparator: rightSpacer ? abilityItem.headItemIsSeparator : abilityItem.tailItemIsSeparator
//in case there is a neighbour separator, lastValidIndex is used in order to protect from false
@ -52,9 +52,9 @@ Item{
target: hiddenSpacer
property: "nHiddenSize"
value: {
if (isForcedHidden) {
if (abilityItem.isHidden) {
return 0;
} else if (!inAttentionAnimation && !inFastRestoreAnimation) {
} else if (!abilityItem.parabolicItem.isUpdatingOnlySpacers) {
return (nScale > 0) ? (maxSize * nScale) + separatorSpace : separatorSpace;
} else {
return (nScale > 0) ? (abilityItem.abilities.metrics.iconSize * nScale) + separatorSpace : separatorSpace;
@ -65,7 +65,7 @@ Item{
Connections{
target: abilityItem
onContainsMouseChanged: {
if (!abilityItem.containsMouse && !isHiddenSpacerVisible) {
if (!abilityItem.containsMouse && !abilityItem.isHiddenSpacerForcedShow) {
hiddenSpacer.nScale = 0;
}
}

View File

@ -157,7 +157,7 @@ Item{
//! Latte Side Painting-style if the user chose it
Loader{
anchors.fill: _contentItemContainer
active: plasmoid.configuration.forceMonochromaticIcons
active: abilityItem.isMonochromaticForcedContentItem
sourceComponent: ColorOverlay {
anchors.fill: parent

View File

@ -20,6 +20,7 @@
import QtQuick 2.8
import QtQuick.Layouts 1.1
import QtGraphicalEffects 1.0
import org.kde.plasma.core 2.0 as PlasmaCore

View File

@ -41,8 +41,8 @@ AbilityItem.BasicItem {
objectName: "TaskItem"
isHidden: !visible || isForcedHidden
isHiddenSpacerVisible: taskItem.inAttentionAnimation
|| taskItem.inFastRestoreAnimation
isHiddenSpacerForcedShow: taskItem.inAttentionAnimation || taskItem.inFastRestoreAnimation
isHiddenSpacerAnimated: taskItem.inFastRestoreAnimation
|| showWindowAnimation.running
|| restoreAnimation.running
@ -50,6 +50,7 @@ AbilityItem.BasicItem {
|| taskItem.inRemoveStage
|| (taskItem.containsMouse && inAttentionAnimation && taskItem.parabolicItem.zoom!==taskItem.abilities.parabolic.factor.zoom)
isMonochromaticForcedContentItem: plasmoid.configuration.forceMonochromaticIcons
isSeparatorInRealLength: isSeparator && root.dragSource