fix #187,counter for actions blockHiding

pull/1/head
Michail Vourlakos 8 years ago
parent 3de93d24f0
commit 5aca9b340d

@ -115,16 +115,11 @@ Window{
}
Text{
text: "Block Hiding (flag)"+space
text: "Actions Block Hiding "+space
}
Text{
text: {
if (dock.visibility.blockHiding)
return "Yes";
else
return "No";
}
text: root.actionsBlockHiding
}
Text{

@ -65,6 +65,7 @@ DragDrop.DropArea {
property bool smallAutomaticIconJumps: true
property bool useThemePanel: noApplets === 0 ? true : plasmoid.configuration.useThemePanel
property int actionsBlockHiding: 0 //actions that block hiding
property int animationsNeedBothAxis:0 //animations need space in both axes, e.g zooming a task
property int animationsNeedLength: 0 // animations need length, e.g. adding a task
@ -458,7 +459,7 @@ DragDrop.DropArea {
latteApplet.signalAnimationsNeedBothAxis.connect(slotAnimationsNeedBothAxis);
latteApplet.signalAnimationsNeedLength.connect(slotAnimationsNeedLength);
latteApplet.signalAnimationsNeedThickness.connect(slotAnimationsNeedThickness);
latteApplet.signalDraggingState.connect(slotDisableHiding);
latteApplet.signalActionsBlockHiding.connect(slotActionsBlockHiding);
}
}
@ -882,12 +883,23 @@ DragDrop.DropArea {
//this is used when dragging a task in order to not hide the dock
//and also by the menu appearing from tasks for the same reason
function slotDisableHiding(value) {
if (root.editMode) {
function slotActionsBlockHiding(step) {
//if (root.editMode) {
// return;
// }
if ((step === 0) || (!dock)) {
return;
}
dock.visibility.blockHiding = value;
actionsBlockHiding = Math.max(actionsBlockHiding + step, 0);
if (actionsBlockHiding > 0){
dock.visibility.blockHiding = true;
} else {
if (!root.editMode)
dock.visibility.blockHiding = false;
}
}
function updateAutomaticIconSize() {

@ -62,7 +62,8 @@ PlasmaComponents.ContextMenu {
function show() {
//trying to use the dragging mechanism in order to not hide the dock
root.disableRestoreZoom = true;
root.signalDraggingState(true);
root.signalActionsBlockHiding(1);
//root.signalDraggingState(true);
loadDynamicLaunchActions(visualParent.m.LauncherUrlWithoutIcon);
// backend.ungrabMouse(visualParent);
openRelative();
@ -206,7 +207,8 @@ PlasmaComponents.ContextMenu {
Component.onDestruction: {
backend.ungrabMouse(visualParent);
root.signalDraggingState(false);
root.signalActionsBlockHiding(-1);
//root.signalDraggingState(false);
root.disableRestoreZoom = false;
checkListHovered.startDuration(100);
}

@ -130,10 +130,11 @@ Item {
signal mouseWasEntered(int delegateIndex, bool value);
signal presentWindows(variant winIds);
signal requestLayout;
signal signalActionsBlockHiding(int value);
signal signalAnimationsNeedBothAxis(int value);
signal signalAnimationsNeedLength(int value);
signal signalAnimationsNeedThickness(int value);
signal signalDraggingState(bool value);
//signal signalDraggingState(bool value);
signal showPreviewForTasks(QtObject group);
//trigger updating scaling of neighbour delegates of zoomed delegate
signal updateScale(int delegateIndex, real newScale, real step)
@ -181,11 +182,13 @@ Item {
onDragSourceChanged: {
if (dragSource == null) {
root.draggingFinished();
root.signalDraggingState(false);
root.signalActionsBlockHiding(-1);
//root.signalDraggingState(false);
tasksModel.syncLaunchers();
} else {
root.signalDraggingState(true);
root.signalActionsBlockHiding(1);
//root.signalDraggingState(true);
}
}
@ -211,14 +214,17 @@ Item {
mainItem: toolTipDelegate
visible: false
property bool signalSent: false
property Item activeItem: null
function hide(debug){
//console.log("on hide event called: "+debug);
if (latteDock) {
if (latteDock && signalSent) {
//it is used to unblock dock hiding
root.signalDraggingState(false);
root.signalActionsBlockHiding(-1);
signalSent = false;
//root.signalDraggingState(false);
}
windowsPreviewDlg.activeItem = null;
@ -244,9 +250,11 @@ Item {
activeItem = taskItem;
toolTipDelegate.parentTask = taskItem;
if (latteDock) {
if (latteDock && !signalSent) {
//it is used to block dock hiding
root.signalDraggingState(true);
root.signalActionsBlockHiding(1);
signalSent = true;
//root.signalDraggingState(true);
}
//small delay to show in order to not mess up with the buffers clearing

Loading…
Cancel
Save