mirror of
https://github.com/KDE/latte-dock.git
synced 2025-03-09 16:58:16 +03:00
restack applets internal ClickEffect
--internal click effect is now moved to CompactApplet which is much better place to be. This way fullrepresentation applets do not use it at all
This commit is contained in:
parent
27c6225b1a
commit
d84e50a594
@ -326,7 +326,7 @@ Item {
|
||||
property Item userRequests: null
|
||||
|
||||
property bool containsMouse: parabolicAreaLoader.active && parabolicAreaLoader.item.containsMouse
|
||||
property bool pressed: viewSignalsConnector.pressed || clickedAnimation.running
|
||||
property bool pressed: viewSignalsConnector.pressed
|
||||
|
||||
|
||||
//// BEGIN :: Animate Applet when a new applet is dragged in the view
|
||||
@ -1019,33 +1019,4 @@ Item {
|
||||
easing.type: Easing.InCubic
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
/////Clicked Animation/////
|
||||
SequentialAnimation{
|
||||
id: clickedAnimation
|
||||
alwaysRunToEnd: true
|
||||
running: appletItem.isSquare && !originalAppletBehavior && appletItem.pressed
|
||||
&& (appletItem.animations.speedFactor.current > 0) && !indicators.info.providesClickedAnimation
|
||||
|
||||
ParallelAnimation{
|
||||
PropertyAnimation {
|
||||
target: wrapper.clickedEffect
|
||||
property: "brightness"
|
||||
to: -0.35
|
||||
duration: appletItem.animations.duration.large
|
||||
easing.type: Easing.OutQuad
|
||||
}
|
||||
}
|
||||
ParallelAnimation{
|
||||
PropertyAnimation {
|
||||
target: wrapper.clickedEffect
|
||||
property: "brightness"
|
||||
to: 0
|
||||
duration: appletItem.animations.duration.large
|
||||
easing.type: Easing.OutQuad
|
||||
}
|
||||
}
|
||||
}
|
||||
//END animations
|
||||
}
|
||||
|
@ -153,7 +153,6 @@ Item{
|
||||
property int index: appletItem.index
|
||||
|
||||
property Item wrapperContainer: _wrapperContainer
|
||||
property Item clickedEffect: _clickedEffect
|
||||
property Item overlayIconLoader: _overlayIconLoader
|
||||
|
||||
readonly property int internalSplitterComputedLength: {
|
||||
@ -679,14 +678,6 @@ Item{
|
||||
}
|
||||
}
|
||||
|
||||
BrightnessContrast {
|
||||
id: _clickedEffect
|
||||
anchors.fill: _wrapperContainer
|
||||
source: _wrapperContainer
|
||||
|
||||
visible: clickedAnimation.running && !indicators.info.providesClickedAnimation
|
||||
}
|
||||
|
||||
Loader{
|
||||
anchors.fill: parent
|
||||
active: appletItem.debug.graphicsEnabled
|
||||
|
@ -6,6 +6,7 @@
|
||||
import QtQuick 2.0
|
||||
import QtQuick.Layouts 1.1
|
||||
import QtQuick.Window 2.0
|
||||
import QtGraphicalEffects 1.0
|
||||
|
||||
import org.kde.plasma.core 2.0 as PlasmaCore
|
||||
import org.kde.plasma.components 2.0 as PlasmaComponents
|
||||
@ -32,6 +33,10 @@ PlasmaCore.ToolTipArea {
|
||||
property Item compactRepresentationVisualParent: originalCompactRepresenationParent && originalCompactRepresenationParent.parent
|
||||
? originalCompactRepresenationParent.parent.parent : null
|
||||
|
||||
property Item appletItem: compactRepresentationVisualParent
|
||||
&& compactRepresentationVisualParent.parent
|
||||
&& compactRepresentationVisualParent.parent.parent ? compactRepresentationVisualParent.parent.parent.parent : null
|
||||
|
||||
onCompactRepresentationChanged: {
|
||||
if (compactRepresentation) {
|
||||
originalCompactRepresenationParent = compactRepresentation.parent;
|
||||
@ -194,6 +199,48 @@ PlasmaCore.ToolTipArea {
|
||||
popupWindow.requestActivate();
|
||||
}
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
////Clicked Effect ////
|
||||
BrightnessContrast {
|
||||
id: _clickedEffect
|
||||
anchors.fill: parent
|
||||
source: compactRepresentation
|
||||
visible: appletItem && clickedAnimation.running && !appletItem.indicators.info.providesClickedAnimation
|
||||
z:1000
|
||||
}
|
||||
|
||||
/////Clicked Animation/////
|
||||
SequentialAnimation{
|
||||
id: clickedAnimation
|
||||
alwaysRunToEnd: true
|
||||
running: appletItem
|
||||
&& appletItem.animations
|
||||
&& appletItem.indicators
|
||||
&& appletItem.isSquare
|
||||
&& appletItem.pressed
|
||||
&& !appletItem.originalAppletBehavior
|
||||
&& (appletItem.animations.speedFactor.current > 0)
|
||||
&& !appletItem.indicators.info.providesClickedAnimation
|
||||
|
||||
ParallelAnimation{
|
||||
PropertyAnimation {
|
||||
target: _clickedEffect
|
||||
property: "brightness"
|
||||
to: -0.35
|
||||
duration: appletItem && appletItem.animations ? appletItem.animations.duration.large : 0
|
||||
easing.type: Easing.OutQuad
|
||||
}
|
||||
}
|
||||
ParallelAnimation{
|
||||
PropertyAnimation {
|
||||
target: _clickedEffect
|
||||
property: "brightness"
|
||||
to: 0
|
||||
duration: appletItem && appletItem.animations ? appletItem.animations.duration.large : 0
|
||||
easing.type: Easing.OutQuad
|
||||
}
|
||||
}
|
||||
}
|
||||
//END animations
|
||||
}
|
||||
|
Loading…
x
Reference in New Issue
Block a user