fixes for tasks spacers for multiple separators

pull/2/head
Michail Vourlakos 7 years ago
parent 83c901de0e
commit 147529dd72

@ -86,6 +86,7 @@ int main(int argc, char **argv)
, {"import", i18nc("command line", "Import configuration."), i18nc("command line: import", "file_name")}
, {"mask", i18nc("command line" , "Show messages of debugging for the mask (Only useful to devs).")}
, {"timers", i18nc("command line", "Show messages for debugging the timers (Only useful to devs).")}
, {"spacers", i18nc("command line", "Show visual indicators for debugging spacers (Only useful to devs).")}
});
parser.process(app);

@ -62,14 +62,18 @@ Item{
parabolicManager.isSeparator(index+1) : parabolicManager.isSeparator(index-1)
}
/* Rectangle{
width: !root.isVertical ? parent.width : 1
height: !root.isVertical ? 1 : parent.height
x: root.isVertical ? parent.width /2 : 0
y: !root.isVertical ? parent.height /2 : 0
border.width: 1
border.color: "red"
color: "transparent"
}*/
Loader{
active: root.debugModeSpacers
Rectangle{
width: !root.isVertical ? hiddenSpacer.width : 1
height: !root.isVertical ? 1 : hiddenSpacer.height
x: root.isVertical ? hiddenSpacer.width/2 : 0
y: !root.isVertical ? hiddenSpacer.height /2 : 0
border.width: 1
border.color: "red"
color: "transparent"
}
}
}

@ -48,8 +48,10 @@ DragDrop.DropArea {
////BEGIN properties
property bool debugMode: Qt.application.arguments.indexOf("--graphics")>=0
property bool debugModeWindow: Qt.application.arguments.indexOf("--with-window")>=0
property bool debugModeSpacers: Qt.application.arguments.indexOf("--spacers")>=0
property bool debugModeTimers: Qt.application.arguments.indexOf("--timers")>=0
property bool debugModeWindow: Qt.application.arguments.indexOf("--with-window")>=0
property bool globalDirectRender: false //it is used as a globalDirectRender for all elements in the dock
property bool directRenderTimerIsRunning: enableDirectRenderTimer.running
property int directRenderAnimationTime: 0

@ -44,12 +44,14 @@ Item {
Connections{
target: root
onTasksCountChanged:{
firstRealTaskIndex = firstRealTask();
lastRealTaskIndex = lastRealTask();
onTasksCountChanged:parManager.updateTasksEdgesIndexes();
}
root.separatorsUpdated();
}
function updateTasksEdgesIndexes() {
firstRealTaskIndex = firstRealTask();
lastRealTaskIndex = lastRealTask();
root.separatorsUpdated();
}
//!this is used in order to update the index when the signal is for applets
@ -433,7 +435,7 @@ Item {
}
}
return root.tasksCount>0 ? root.tasksCount-1 : -1;;
return root.tasksCount>0 ? root.tasksCount-1 : -1;
}
function freeAvailableSeparatorName() {

@ -27,7 +27,7 @@ Item{
width: root.vertical ? wrapper.width : nHiddenSize
height: root.vertical ? nHiddenSize : wrapper.height
visible: (rightSpacer ? index === icList.count - 1 : index === 0)
visible: (rightSpacer ? index === parabolicManager.lastRealTaskIndex : index === parabolicManager.firstRealTaskIndex)
|| (separatorSpace > 0) || mainItemContainer.inAttentionAnimation
|| mainItemContainer.inFastRestoreAnimation || mainItemContainer.inMimicParabolicAnimation
@ -106,13 +106,18 @@ Item{
NumberAnimation { duration: root.directRenderAnimationTime }
}
/*Rectangle{
width: !root.vertical ? parent.width : 1
height: !root.vertical ? 1 : parent.height
x: root.vertical ? parent.width /2 : 0
y: !root.vertical ? parent.height /2 : 0
border.width: 1
border.color: "red"
color: "transparent"
}*/
Loader{
active: latteDock && latteDock.debugModeSpacers
Rectangle{
width: !root.vertical ? hiddenSpacer.width : 1
height: !root.vertical ? 1 : hiddenSpacer.height
x: root.vertical ? hiddenSpacer.width/2 : 0
y: !root.vertical ? hiddenSpacer.height/2 : 0
border.width: 1
border.color: "red"
color: "transparent"
}
}
}

@ -236,13 +236,13 @@ Item{
var scales = parabolicManager.applyParabolicEffect(index, currentMousePosition, center);
//Left hiddenSpacer
if(((index === 0 )&&(icList.count > 1)) && !root.disableLeftSpacer
if(((index === parabolicManager.firstRealTaskIndex )&&(root.tasksCount>0)) && !root.disableLeftSpacer
&& !inMimicParabolicAnimation && !inFastRestoreAnimation){
hiddenSpacerLeft.nScale = scales.leftScale - 1;
}
//Right hiddenSpacer
if(((index === icList.count - 1 )&&(icList.count>1)) && !root.disableRightSpacer
if(((index === parabolicManager.lastRealTaskIndex )&&(root.tasksCount>0)) && !root.disableRightSpacer
&& !inMimicParabolicAnimation && !inFastRestoreAnimation){
hiddenSpacerRight.nScale = scales.rightScale - 1;
}

Loading…
Cancel
Save