fix binding loops that broke separators experience

pull/1/head
Michail Vourlakos 8 years ago
parent f0e7992d2a
commit fbf952f606

@ -103,7 +103,7 @@ Item {
var tHIndex = -1;
if(!root.latteApplet || Math.abs(root.latteAppletPos-index)>1 || !root.hasInternalSeparator
|| (root.hasInternalSeparator
|| (root.latteApplet && root.hasInternalSeparator
&& ((root.latteApplet.internalSeparatorPos>0 && root.latteApplet.internalSeparatorPos<root.tasksCount-1)
|| (root.latteApplet.internalSeparatorPos===0 && index>root.latteAppletPos)
|| (root.latteApplet.internalSeparatorPos===root.tasksCount-1 && index<root.latteAppletPos)))

@ -230,7 +230,8 @@ DragDrop.DropArea {
property bool smartLaunchersEnabled: plasmoid.configuration.smartLaunchersEnabled
property bool threeColorsWindows: plasmoid.configuration.threeColorsWindows
property int latteInternalSeparatorPos: latteApplet ? latteApplet.internalSeparatorPos : -1
readonly property int latteInternalSeparatorPos: latteApplet ? latteApplet.internalSeparatorPos : -1
readonly property bool hasInternalSeparator: latteApplet ? latteApplet.hasInternalSeparator : false
property int latteAppletHoveredIndex: latteApplet ? latteApplet.hoveredIndex : -1
property int tasksCount: latteApplet ? latteApplet.tasksCount : 0

@ -28,9 +28,16 @@ import QtQuick 2.0
Item {
id: parManager
readonly property bool hasInternalSeparator: internalSeparatorPos > -1
property bool hasInternalSeparator: false
property int internalSeparatorPos: -1
onInternalSeparatorPosChanged: {
if (internalSeparatorPos>-1)
hasInternalSeparator = true;
else
hasInternalSeparator = false;
}
//!this is used in order to update the index when the signal is for applets
//!outside the latte plasmoid
function updateIdSendScale(index, zScale, zStep){

@ -285,7 +285,7 @@ MouseArea{
property bool neighbourSeparator: false
//in case there is a neighbour separator
property int separatorSpace: (parabolicManager.hasInternalSeparator
property int separatorSpace: (parabolicManager.internalSeparatorPos !== -1
&& parabolicManager.internalSeparatorPos === index-1)
|| neighbourSeparator ? (2+root.iconMargin/2) : 0
@ -337,7 +337,7 @@ MouseArea{
property bool neighbourSeparator: false
//in case there is a neighbour separator
property int separatorSpace: (parabolicManager.hasInternalSeparator
property int separatorSpace: (parabolicManager.internalSeparatorPos !== -1
&& parabolicManager.internalSeparatorPos === index+1)
|| neighbourSeparator ? (2+root.iconMargin/2) : 0

Loading…
Cancel
Save