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
v0.6
Michail Vourlakos 8 years ago
parent dce87f13a6
commit b510fdcdb5

@ -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…
Cancel
Save