mirror of
https://github.com/KDE/latte-dock.git
synced 2025-02-09 05:57:39 +03:00
clean plasmoid zoom in spesific cases
--fixes a small issue when hovering applets too fast sometimes the tasks inside the plasmoid didnt catch up to restore their zoom
This commit is contained in:
parent
cd0eeb9ff1
commit
8ef2560688
@ -49,7 +49,7 @@ Item {
|
||||
(index === secondLayout.beginIndex)&&(secondLayout.count > 1)
|
||||
//applet is in ending edge
|
||||
property bool endEdge: plasmoid.configuration.panelPosition !== Latte.Dock.Justify ? (index === mainLayout.count - 1)&&(mainLayout.count>1) :
|
||||
((index === mainLayout.count - 2)&&(mainLayout.count>2))||((index === secondLayout.beginIndex+secondLayout.count-1)&&(secondLayout.count>1))
|
||||
((index === mainLayout.count - 2)&&(mainLayout.count>2))||((index === secondLayout.beginIndex+secondLayout.count-1)&&(secondLayout.count>1))
|
||||
|
||||
|
||||
|
||||
@ -90,6 +90,12 @@ Item {
|
||||
console.log(computeHeight);
|
||||
}*/
|
||||
|
||||
onIndexChanged: {
|
||||
if (container.nowDock) {
|
||||
root.latteAppletPos = index;
|
||||
}
|
||||
}
|
||||
|
||||
/// BEGIN functions
|
||||
function checkIndex(){
|
||||
index = -1;
|
||||
@ -174,6 +180,7 @@ Item {
|
||||
if(container.nowDock){
|
||||
root.nowDock = container.nowDock;
|
||||
root.nowDockContainer = container;
|
||||
root.latteAppletPos = index;
|
||||
nowDock.nowDockPanel = root;
|
||||
nowDock.forceHidePanel = true;
|
||||
nowDock.updateScale.connect(interceptNowDockUpdateScale);
|
||||
@ -655,6 +662,14 @@ Item {
|
||||
// currentLayout.updateScale(index-2, 1, 0);
|
||||
// currentLayout.updateScale(index+2, 1, 0);
|
||||
|
||||
if (root.nowDock) {
|
||||
if ((index-1) > root.latteAppletPos ){
|
||||
root.nowDock.clearZoom();
|
||||
} else if((index+1)<root.latteAppletPos) {
|
||||
root.nowDock.clearZoom();
|
||||
}
|
||||
}
|
||||
|
||||
//Left hiddenSpacer
|
||||
if(container.startEdge){
|
||||
hiddenSpacerLeft.nScale = leftScale - 1;
|
||||
@ -687,7 +702,7 @@ Item {
|
||||
if(layoutsContainer.hoveredIndex<container.index){
|
||||
nowDock.updateScale(0, nScale, step);
|
||||
nowDock.updateScale(1, 1, 0);
|
||||
} else if(layoutsContainer.hoveredIndex>=container.index) {
|
||||
} else if(layoutsContainer.hoveredIndex>container.index) {
|
||||
nowDock.updateScale(root.tasksCount-1, nScale, step);
|
||||
nowDock.updateScale(root.tasksCount-2, 1, 0);
|
||||
}
|
||||
|
@ -69,6 +69,7 @@ DragDrop.DropArea {
|
||||
property int iconSize: (automaticIconSizeBasedSize > 0 && !root.editMode) ? Math.min(automaticIconSizeBasedSize, plasmoid.configuration.iconSize) :
|
||||
plasmoid.configuration.iconSize
|
||||
property int iconStep: 8
|
||||
property int latteAppletPos: -1
|
||||
property int panelEdgeSpacing: iconSize / 3
|
||||
//FIXME: this is not needed any more probably
|
||||
property int previousAllTasks: -1 //is used to forbit updateAutomaticIconSize when hovering
|
||||
|
Loading…
x
Reference in New Issue
Block a user