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{
text: "Block Hiding (flag)"+space text: "Actions Block Hiding "+space
} }
Text{ Text{
text: { text: root.actionsBlockHiding
if (dock.visibility.blockHiding)
return "Yes";
else
return "No";
}
} }
Text{ Text{

@ -65,6 +65,7 @@ DragDrop.DropArea {
property bool smallAutomaticIconJumps: true property bool smallAutomaticIconJumps: true
property bool useThemePanel: noApplets === 0 ? true : plasmoid.configuration.useThemePanel 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 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 property int animationsNeedLength: 0 // animations need length, e.g. adding a task
@ -458,7 +459,7 @@ DragDrop.DropArea {
latteApplet.signalAnimationsNeedBothAxis.connect(slotAnimationsNeedBothAxis); latteApplet.signalAnimationsNeedBothAxis.connect(slotAnimationsNeedBothAxis);
latteApplet.signalAnimationsNeedLength.connect(slotAnimationsNeedLength); latteApplet.signalAnimationsNeedLength.connect(slotAnimationsNeedLength);
latteApplet.signalAnimationsNeedThickness.connect(slotAnimationsNeedThickness); 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 //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 //and also by the menu appearing from tasks for the same reason
function slotDisableHiding(value) { function slotActionsBlockHiding(step) {
if (root.editMode) { //if (root.editMode) {
// return;
// }
if ((step === 0) || (!dock)) {
return; 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() { function updateAutomaticIconSize() {

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

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

Loading…
Cancel
Save