1
0
mirror of https://github.com/KDE/latte-dock.git synced 2025-03-20 06:50:28 +03:00

block zoom hovering on dock sliding in/out

This commit is contained in:
Michail Vourlakos 2017-07-26 01:26:44 +03:00
parent 0cdd8916cf
commit ba3de5061f
4 changed files with 27 additions and 1 deletions

View File

@ -424,7 +424,10 @@ Item{
id: slidingAnimationAutoHiddenOut
ScriptAction{
script: dock.visibility.isHidden = true;
script: {
dock.visibility.isHidden = true;
root.isHalfShown = true;
}
}
PropertyAnimation {
@ -476,6 +479,12 @@ Item{
easing.type: Easing.OutQuad
}
ScriptAction{
script: {
root.isHalfShown = false;
}
}
onStarted: {
if (manager.debugMagager) {
console.log("showing animation started...");

View File

@ -576,6 +576,10 @@ Item {
layoutsContainer.hoveredIndex = index;
if (root.isHalfShown) {
return;
}
if (root.isHorizontal){
layoutsContainer.currentSpot = mouseX;
wrapper.calculateScales(mouseX);
@ -602,6 +606,10 @@ Item {
return;
}
if (root.isHalfShown) {
return;
}
if (root.isHorizontal){
var step = Math.abs(layoutsContainer.currentSpot-mouse.x);
if (step >= container.animationStep){

View File

@ -79,6 +79,7 @@ DragDrop.DropArea {
property bool immutable: plasmoid.immutable
property bool indicateAudioStreams: plasmoid.configuration.indicateAudioStreams
property bool inStartup: true
property bool isHalfShown: false //is used to disable the zoom hovering effect at sliding in-out the dock
property bool isHorizontal: plasmoid.formFactor === PlasmaCore.Types.Horizontal
property bool isVertical: !isHorizontal
property bool isHovered: latteApplet ? ((latteAppletHoveredIndex !== -1) && (layoutsContainer.hoveredIndex !== -1)) //|| wholeArea.containsMouse

View File

@ -532,6 +532,10 @@ MouseArea{
if(!root.latteDock)
checkListHovered.stop();
if (root.latteDock && root.latteDock.isHalfShown) {
return;
}
if((!inAnimation)&&(root.dragSource == null)&&(!root.taskInAnimation) && hoverEnabled){
icList.hoveredIndex = index;
if (!inBlockingAnimation) {
@ -579,6 +583,10 @@ MouseArea{
if(!root.latteDock)
checkListHovered.stop();
if (root.latteDock && root.latteDock.isHalfShown) {
return;
}
if((inAnimation == false)&&(!root.taskInAnimation)&&(!root.disableRestoreZoom) && hoverEnabled){
if(root.dragSource == null){
if (icList.orientation == Qt.Horizontal){