mirror of
https://github.com/KDE/latte-dock.git
synced 2025-02-09 21:57:37 +03:00
support property AbilityDefinition.Animations
--use qml for this and it is much better than c++
This commit is contained in:
parent
529efe548a
commit
732c7821f1
@ -23,19 +23,18 @@ AnimationsPrivate {
|
||||
id: apis
|
||||
|
||||
publicApi: Item {
|
||||
//! animations properties
|
||||
readonly property alias active: apis.active
|
||||
readonly property alias hasThicknessAnimation: apis.hasThicknessAnimation
|
||||
|
||||
readonly property alias duration: apis.duration
|
||||
readonly property alias speedFactor: apis.speedFactor
|
||||
|
||||
//! animations tracking
|
||||
readonly property alias needBothAxis: apis.needBothAxis
|
||||
readonly property alias needLength: apis.needLength
|
||||
readonly property alias needThickness: apis.needThickness
|
||||
|
||||
//! animations properties
|
||||
readonly property alias hasThicknessAnimation: apis.hasThicknessAnimation
|
||||
|
||||
readonly property alias duration: apis.duration
|
||||
readonly property alias speedFactor: apis.speedFactor
|
||||
|
||||
//! parabolic effect animations
|
||||
readonly property alias minZoomFactor: apis.minZoomFactor
|
||||
readonly property alias hoverPixelSensitivity: apis.hoverPixelSensitivity
|
||||
|
@ -53,9 +53,9 @@ AbilityDefinition.Animations {
|
||||
//C3 property int animationStep -> hoverPixelSensitivity
|
||||
//C4 property int animationsZoomFactor -> minZoomFactor
|
||||
|
||||
active: plasmoid.configuration.animationsEnabled && LatteCore.WindowSystem.compositingActive
|
||||
|
||||
//! animations properties
|
||||
active: plasmoid.configuration.animationsEnabled && LatteCore.WindowSystem.compositingActive
|
||||
hasThicknessAnimation: (needBothAxis.count>0) || (needThickness.count>0)
|
||||
|
||||
duration.large: LatteCore.Environment.longDuration
|
||||
|
@ -153,7 +153,7 @@ Item {
|
||||
readonly property bool isSquare: communicator.overlayLatteIconIsActive
|
||||
readonly property bool screenEdgeMarginSupported: communicator.requires.screenEdgeMarginSupported
|
||||
|
||||
property int animationTime: animations.speedFactor.normal * (1.2 *animations.shortDuration)
|
||||
property int animationTime: animations.speedFactor.normal * (1.2*animations.duration.small)
|
||||
property int hoveredIndex: layoutsContainer.hoveredIndex
|
||||
property int index: -1
|
||||
property int maxWidth: root.isHorizontal ? root.height : root.width
|
||||
|
@ -74,6 +74,7 @@ Item {
|
||||
readonly property int version: LatteCore.Environment.makeVersion(0,9,4)
|
||||
|
||||
property bool globalDirectRender: false //it is used as a globalDirectRender for all elements in the dock
|
||||
|
||||
property int directRenderAnimationTime: 0
|
||||
|
||||
property bool addLaunchersMessage: false
|
||||
|
@ -23,45 +23,27 @@ import "./animations" as AnimationsTypes
|
||||
|
||||
Item {
|
||||
property bool active: false
|
||||
|
||||
property bool hasThicknessAnimation: false
|
||||
|
||||
//! animations properties
|
||||
readonly property alias duration: _duration
|
||||
readonly property alias speedFactor: _speedFactor
|
||||
|
||||
//! animations tracking
|
||||
property QtObject needBothAxis: _bothAxis
|
||||
property QtObject needLength: _needLength
|
||||
property QtObject needThickness: _needThickness
|
||||
|
||||
//! animations related to parabolic effect
|
||||
property int hoverPixelSensitivity: 1
|
||||
property real minZoomFactor : 1.0
|
||||
|
||||
//! Grouped Properties Structures
|
||||
AnimationsTypes.SpeedFactor {
|
||||
id: _speedFactor
|
||||
normal: 1.0
|
||||
current: 1.0
|
||||
}
|
||||
|
||||
AnimationsTypes.Duration {
|
||||
id: _duration
|
||||
property AnimationsTypes.Duration duration: AnimationsTypes.Duration {
|
||||
large: 500
|
||||
proposed: 1000
|
||||
small: 250
|
||||
}
|
||||
|
||||
AnimationsTypes.Tracker {
|
||||
id: _bothAxis
|
||||
property AnimationsTypes.SpeedFactor speedFactor: AnimationsTypes.SpeedFactor {
|
||||
id: _speedFactor
|
||||
normal: 1.0
|
||||
current: 1.0
|
||||
}
|
||||
|
||||
AnimationsTypes.Tracker {
|
||||
id: _needLength
|
||||
}
|
||||
//! animations tracking
|
||||
property AnimationsTypes.Tracker needBothAxis: AnimationsTypes.Tracker{}
|
||||
property AnimationsTypes.Tracker needLength: AnimationsTypes.Tracker{}
|
||||
property AnimationsTypes.Tracker needThickness: AnimationsTypes.Tracker{}
|
||||
|
||||
AnimationsTypes.Tracker {
|
||||
id: _needThickness
|
||||
}
|
||||
//! animations related to parabolic effect
|
||||
property int hoverPixelSensitivity: 1
|
||||
property real minZoomFactor : 1.0
|
||||
}
|
||||
|
Loading…
x
Reference in New Issue
Block a user