1
0
mirror of https://github.com/KDE/latte-dock.git synced 2025-01-12 01:17:55 +03:00

restore slide-out remove window animation

--update it to Kirigami.Icon infrastructure
This commit is contained in:
Michail Vourlakos 2021-02-04 00:08:23 +02:00
parent 08118d531c
commit 4be537d24d
2 changed files with 25 additions and 25 deletions

View File

@ -80,9 +80,6 @@ Item {
id: taskIconItem id: taskIconItem
anchors.fill: parent anchors.fill: parent
//roundToIconSize: false //roundToIconSize: false
//! Trying to provide crisp icons for regular and zoomed size and smooth appearance in-between
//! bug:432477
//smooth: size !== taskItem.abilities.metrics.iconSize && size !== (taskItem.abilities.metrics.iconSize*taskItem.abilities.parabolic.zoom)
source: decoration source: decoration
visible: !badgesLoader.active visible: !badgesLoader.active

View File

@ -24,6 +24,8 @@ import QtGraphicalEffects 1.0
import org.kde.plasma.plasmoid 2.0 import org.kde.plasma.plasmoid 2.0
import org.kde.plasma.core 2.0 as PlasmaCore import org.kde.plasma.core 2.0 as PlasmaCore
import org.kde.kirigami 2.0 as Kirigami
import org.kde.latte.core 0.2 as LatteCore import org.kde.latte.core 0.2 as LatteCore
/////Removing a Window from a group//// /////Removing a Window from a group////
@ -62,30 +64,9 @@ Item{
id: removeTask id: removeTask
width: taskIcon.width width: taskIcon.width
height: taskIcon.height height: taskIcon.height
visible: false visible: false
LatteCore.IconItem{ //! Shadow
id: tempRemoveIcon
anchors.rightMargin: root.location === PlasmaCore.Types.LeftEdge ? taskItem.abilities.metrics.margin.thickness : 0
anchors.leftMargin: root.location === PlasmaCore.Types.RightEdge ? taskItem.abilities.metrics.margin.thickness : 0
anchors.topMargin: root.location === PlasmaCore.Types.BottomEdge ? taskItem.abilities.metrics.margin.thickness : 0
anchors.bottomMargin: root.location === PlasmaCore.Types.TopEdge ? taskItem.abilities.metrics.margin.thickness : 0
anchors.horizontalCenter: !root.vertical ? parent.horizontalCenter : undefined;
anchors.verticalCenter: root.vertical ? parent.verticalCenter : undefined;
anchors.right: root.location === PlasmaCore.Types.LeftEdge ? parent.right : undefined;
anchors.left: root.location === PlasmaCore.Types.RightEdge ? parent.left : undefined;
anchors.top: root.location === PlasmaCore.Types.BottomEdge ? parent.top : undefined;
anchors.bottom: root.location === PlasmaCore.Types.TopEdge ? parent.bottom : undefined;
width: taskIconItem.width
height: width
visible: taskItem.abilities.myView.itemShadow.isEnabled ? false : true
source: taskIconItem.lastValidSourceName
}
Loader{ Loader{
id: tempTaskShadow id: tempTaskShadow
anchors.fill: tempRemoveIcon anchors.fill: tempRemoveIcon
@ -102,6 +83,28 @@ Item{
} }
} }
Kirigami.Icon{
id: tempRemoveIcon
anchors.rightMargin: root.location === PlasmaCore.Types.LeftEdge ? taskItem.abilities.metrics.margin.thickness : 0
anchors.leftMargin: root.location === PlasmaCore.Types.RightEdge ? taskItem.abilities.metrics.margin.thickness : 0
anchors.topMargin: root.location === PlasmaCore.Types.BottomEdge ? taskItem.abilities.metrics.margin.thickness : 0
anchors.bottomMargin: root.location === PlasmaCore.Types.TopEdge ? taskItem.abilities.metrics.margin.thickness : 0
anchors.horizontalCenter: !root.vertical ? parent.horizontalCenter : undefined;
anchors.verticalCenter: root.vertical ? parent.verticalCenter : undefined;
anchors.right: root.location === PlasmaCore.Types.LeftEdge ? parent.right : undefined;
anchors.left: root.location === PlasmaCore.Types.RightEdge ? parent.left : undefined;
anchors.top: root.location === PlasmaCore.Types.BottomEdge ? parent.top : undefined;
anchors.bottom: root.location === PlasmaCore.Types.TopEdge ? parent.bottom : undefined;
width: taskIconItem.width
height: width
source: taskIconItem.source
}
Colorize{ Colorize{
source: tempRemoveIcon source: tempRemoveIcon
anchors.fill: tempRemoveIcon anchors.fill: tempRemoveIcon