diff --git a/plasmoid/contents/ui/TaskDelegate.qml b/plasmoid/contents/ui/TaskDelegate.qml index bfb2cc6f8..05dd2c689 100644 --- a/plasmoid/contents/ui/TaskDelegate.qml +++ b/plasmoid/contents/ui/TaskDelegate.qml @@ -120,6 +120,8 @@ MouseArea{ if (modelLauncherUrl.indexOf("latte-separator.desktop")>=0) isSeparator = true; + else + isSeparator = false; } onModelLauncherUrlWithIconChanged: { @@ -270,7 +272,7 @@ MouseArea{ if (!root.vertical) return 5 + widthMargins; else - return root.iconSize + widthMargins; + return (root.iconSize + widthMargins) * mScale + root.statesLineSize; } if (mainItemContainer.isStartup && root.durationTime !==0 ) @@ -287,7 +289,7 @@ MouseArea{ if (root.vertical) return 5 + heightMargins; else - return root.iconSize + heightMargins; + return (root.iconSize + heightMargins) * mScale + root.statesLineSize; } if (mainItemContainer.isStartup && root.durationTime !==0) @@ -325,8 +327,29 @@ MouseArea{ property real basicScalingWidth : (inTempScaling == true) ? ((root.iconSize + widthMargins) * scaleWidth) : cleanScalingWidth property real basicScalingHeight : (inTempScaling == true) ? ((root.iconSize + heightMargins) * scaleHeight) : cleanScalingHeight - property real regulatorWidth: basicScalingWidth;//-2; - property real regulatorHeight: basicScalingHeight;//-2; + property real regulatorWidth: mainItemContainer.isSeparator ? separatorRegWidth : basicScalingWidth; + property real regulatorHeight: mainItemContainer.isSeparator ? separatorRegHeight : basicScalingHeight; + + property real separatorRegWidth: { + if (!mainItemContainer.isSeparator) + return; + + if (!root.vertical) + return 5 + widthMargins; + else + return (root.iconSize + root.thickMargin) * mScale; + } + + property real separatorRegHeight: { + if (!mainItemContainer.isSeparator) + return; + + if (root.vertical) + return 5 + widthMargins; + else + return (root.iconSize + root.thickMargin) * mScale; + } + /// end of Scalers/////// //property int curIndex: icList.hoveredIndex @@ -395,7 +418,10 @@ MouseArea{ }//Flow function calculateScales( currentMousePosition ){ - if (root.editMode || mainItemContainer.isSeparator) { + if (root.editMode) { + return; + } else if (mainItemContainer.isSeparator) { + wrapper.mScale = root.zoomFactor; return; } @@ -445,8 +471,8 @@ MouseArea{ //activate messages to update the the neighbour scales root.updateScale(index+1, rightScale, 0); root.updateScale(index-1, leftScale, 0); - root.updateScale(index+2, 1, 0); - root.updateScale(index-2, 1, 0); + // root.updateScale(index+2, 1, 0); + // root.updateScale(index-2, 1, 0); //Left hiddenSpacer if(((index === 0 )&&(icList.count > 1)) && !root.disableLeftSpacer){ @@ -466,8 +492,7 @@ MouseArea{ function signalUpdateScale(nIndex, nScale, step){ //if ((index === nIndex)&&(!mainItemContainer.inAnimation)){ - if ((index === nIndex)&&(mainItemContainer.hoverEnabled)&&(waitingLaunchers.length===0) - &&(!mainItemContainer.isSeparator)){ + if ((index === nIndex)&&(mainItemContainer.hoverEnabled)&&(waitingLaunchers.length===0)){ if(nScale >= 0) { mScale = nScale + step; } else { @@ -475,6 +500,13 @@ MouseArea{ } // console.log(index+ ", "+mScale); } + + if ((index === nIndex) && mainItemContainer.isSeparator){ + if (icList.hoveredIndexindex) + root.updateScale(index-1, nScale, step); + } } function sendEndOfNeedBothAxisAnimation(){ @@ -716,10 +748,6 @@ MouseArea{ if(!inAnimation) pressed=false; - } else { - if (isSeparator){ - icList.directRender = false; - } } ////window previews///////// @@ -1021,6 +1049,9 @@ MouseArea{ } function showContextMenu(args) { + if (isSeparator) + return; + contextMenu = root.createContextMenu(mainItemContainer, modelIndex(), args); contextMenu.show(); } diff --git a/plasmoid/contents/ui/TaskGroupItem.qml b/plasmoid/contents/ui/TaskGroupItem.qml index ded85b75f..7f0d87f78 100644 --- a/plasmoid/contents/ui/TaskGroupItem.qml +++ b/plasmoid/contents/ui/TaskGroupItem.qml @@ -40,7 +40,7 @@ Item{ property color minimizedColor: root.threeColorsWindows ? root.minimizedDotColor : isActiveColor property color notActiveColor: mainItemContainer.hasMinimized ? minimizedColor : isActiveColor - /* Rectangle{ + /*Rectangle{ anchors.fill: parent border.width: 1 border.color: "yellow" diff --git a/plasmoid/contents/ui/TaskIconItem.qml b/plasmoid/contents/ui/TaskIconItem.qml index 8e5486e5c..99e1a0819 100644 --- a/plasmoid/contents/ui/TaskIconItem.qml +++ b/plasmoid/contents/ui/TaskIconItem.qml @@ -37,8 +37,8 @@ import org.kde.latte 0.1 as Latte Item{ id: centralItem - width: mainItemContainer.isSeparator ? wrapper.width : wrapper.regulatorWidth - height: mainItemContainer.isSeparator ? wrapper.height : wrapper.regulatorHeight + width: wrapper.regulatorWidth + height: wrapper.regulatorHeight //big interval to show shadows only after all the crappy adds and removes of tasks //have happened @@ -63,12 +63,12 @@ Item{ property QtObject buffers: null property QtObject smartLauncherItem: null - Rectangle{ + /*Rectangle{ anchors.fill: parent border.width: 1 border.color: "green" color: "transparent" - } + }*/ onSmartLauncherEnabledChanged: { if (smartLauncherEnabled && !smartLauncherItem) { @@ -87,8 +87,8 @@ Item{ Rectangle{ id: draggedRectangle - width: iconImageBuffer.width+1 - height: iconImageBuffer.height+1 + width: mainItemContainer.isSeparator ? parent.width + 1 : iconImageBuffer.width+1 + height: mainItemContainer.isSeparator ? parent.height + 1 : iconImageBuffer.height+1 anchors.centerIn: iconGraphic opacity: 0 radius: 3 @@ -118,10 +118,11 @@ Item{ height: parent.height Item{ - anchors.rightMargin: iconImageBuffer.rightMargin - anchors.leftMargin: iconImageBuffer.leftMargin - anchors.bottomMargin: root.position === PlasmaCore.Types.BottomPositioned ? baseMargin : 0 - anchors.topMargin: iconImageBuffer.topMargin + id:separatorItem + anchors.rightMargin: root.position === PlasmaCore.Types.RightPositioned ? localThickMargin : 0 + anchors.leftMargin: root.position === PlasmaCore.Types.LeftPositioned ? localThickMargin : 0 + anchors.bottomMargin: root.position === PlasmaCore.Types.BottomPositioned ? localThickMargin : 0 + anchors.topMargin: root.position === PlasmaCore.Types.TopPositioned ? localThickMargin : 0 anchors.horizontalCenter: !root.vertical ? parent.horizontalCenter : undefined anchors.verticalCenter: root.vertical ? parent.verticalCenter : undefined @@ -130,13 +131,14 @@ Item{ anchors.top: root.position === PlasmaCore.Types.TopPositioned ? parent.top : undefined; anchors.bottom: root.position === PlasmaCore.Types.BottomPositioned ? parent.bottom : undefined; - property int baseMargin: root.statesLineSize + root.thickMarginBase opacity: 0.5 visible: mainItemContainer.isSeparator width: root.vertical ? iconImageBuffer.width : 5 height: !root.vertical ? iconImageBuffer.height : 5 + property int localThickMargin: root.thickMarginBase + 4 + Rectangle { anchors.horizontalCenter: !root.vertical ? parent.horizontalCenter : undefined anchors.verticalCenter: root.vertical ? parent.verticalCenter : undefined