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:
parent
ea489b3c7b
commit
76a08e6897
@ -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 {
|
||||
|
@ -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
|
||||
|
@ -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;
|
||||
}
|
||||
}
|
||||
|
@ -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
|
||||
|
@ -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
|
||||
|
@ -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
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user