1
0
mirror of https://github.com/KDE/latte-dock.git synced 2025-03-21 10:50:30 +03:00

correct signaling for internal separator case

This commit is contained in:
Michail Vourlakos 2017-04-27 20:52:45 +03:00
parent 92f214d552
commit 574f2aedcb
4 changed files with 31 additions and 6 deletions

View File

@ -944,13 +944,21 @@ Item {
}
else{
if(layoutsContainer.hoveredIndex<container.index){
latteApplet.updateScale(0, nScale, step);
//disabled because of the internal tasks separator
latteApplet.updateScale(1, 1, 0);
if (root.latteInternalSeparatorPos===0){
latteApplet.updateScale(1, nScale, step);
latteApplet.updateScale(2,1,0);
} else {
latteApplet.updateScale(0, nScale, step);
latteApplet.updateScale(1, 1, 0);
}
} else if(layoutsContainer.hoveredIndex>container.index) {
latteApplet.updateScale(root.tasksCount-1, nScale, step);
//disabled because of the internal tasks separator
latteApplet.updateScale(root.tasksCount-2, 1, 0);
if (root.latteInternalSeparatorPos===root.tasksCount-1){
latteApplet.updateScale(root.tasksCount-2, nScale, step);
latteApplet.updateScale(root.tasksCount-3, 1, 0);
} else {
latteApplet.updateScale(root.tasksCount-1, nScale, step);
latteApplet.updateScale(root.tasksCount-2, 1, 0);
}
}
}
} ///if the applet is hidden must forward its scale events to its neighbours

View File

@ -211,6 +211,7 @@ DragDrop.DropArea {
property bool smartLaunchersEnabled: plasmoid.configuration.smartLaunchersEnabled
property bool threeColorsWindows: plasmoid.configuration.threeColorsWindows
property int latteInternalSeparatorPos: latteApplet ? latteApplet.internalSeparatorPos : -1
property int latteAppletHoveredIndex: latteApplet ? latteApplet.hoveredIndex : -1
property int tasksCount: latteApplet ? latteApplet.tasksCount : 0

View File

@ -479,6 +479,14 @@ MouseArea{
if(!root.hasInternalSeparator) {
root.updateScale(index+2, 1, 0);
root.updateScale(index-2, 1, 0);
} else if(root.internalSeparatorPos>=0) {
if(root.internalSeparatorPos === index+1){
root.updateScale(index+3, 1, 0);
root.updateScale(index-2, 1, 0);
} else if(root.internalSeparatorPos === index-1) {
root.updateScale(index+2, 1, 0);
root.updateScale(index-3, 1, 0);
}
}
//Left hiddenSpacer
@ -618,6 +626,10 @@ MouseArea{
onItemIndexChanged: {
if (itemIndex>=0)
lastValidTimer.start();
if (isSeparator){
root.internalSeparatorPos = itemIndex;
}
}
onIsDraggedChanged: {

View File

@ -71,6 +71,7 @@ Item {
property int clearWidth
property int clearHeight
property int internalSeparatorPos: -1
property int newLocationDebugUse: PlasmaCore.Types.BottomPositioned
property int newDroppedPosition: -1
property int noInitCreatedBuffers: 0
@ -494,6 +495,9 @@ Item {
}
}
root.hasInternalSeparator = hasSep;
if (!hasSep)
root.internalSeparatorPos = -1;
}
onGroupingAppIdBlacklistChanged: {