mirror of
https://github.com/KDE/latte-dock.git
synced 2025-01-12 01:17:55 +03:00
improve Justify Splitters in SideBars
--improve Justify Splitters experience for vertical Docks/Panels and SidePanels
This commit is contained in:
parent
4df139f34f
commit
8f98ccb5e8
@ -61,10 +61,10 @@ Item{
|
||||
return latteApplet.tasksWidth;
|
||||
} else {
|
||||
if (root.isHorizontal && root.inConfigureAppletsMode) {
|
||||
return Math.max(root.iconSize, scaledWidth);
|
||||
} else {
|
||||
return root.isVertical ? scaledWidth + root.localScreenEdgeMargin : scaledWidth;
|
||||
return Math.max(Math.min(root.iconSize, 64), scaledWidth);
|
||||
}
|
||||
|
||||
return root.isVertical ? scaledWidth + root.localScreenEdgeMargin : scaledWidth;
|
||||
}
|
||||
}
|
||||
|
||||
@ -96,7 +96,7 @@ Item{
|
||||
return latteApplet.tasksHeight;
|
||||
} else {
|
||||
if (root.isVertical && root.inConfigureAppletsMode) {
|
||||
return Math.max(root.iconSize, scaledHeight);
|
||||
return Math.max(Math.min(root.iconSize, 64), scaledHeight);
|
||||
}
|
||||
|
||||
return root.isHorizontal ? scaledHeight + root.localScreenEdgeMargin : scaledHeight;
|
||||
@ -132,7 +132,7 @@ Item{
|
||||
root.thickMargins :
|
||||
(root.inFullJustify && atScreenEdge && !parabolicEffectMarginsEnabled ? edgeLengthMargins : localLengthMargins) //Fitt's Law
|
||||
|
||||
property int localLengthMargins: isSeparator || !communicator.lengthMarginsEnabled ? 0 : appletItem.lengthAppletFullMargins
|
||||
property int localLengthMargins: isSeparator || !communicator.lengthMarginsEnabled || isInternalViewSplitter ? 0 : appletItem.lengthAppletFullMargins
|
||||
property int edgeLengthMargins: edgeLengthMarginsDisabled ? 0 : appletItem.lengthAppletIntMargin * 2
|
||||
|
||||
property real scaledWidth: zoomScaleWidth * (layoutWidth + marginWidth)
|
||||
@ -310,10 +310,11 @@ Item{
|
||||
if (isLattePlasmoid) {
|
||||
return;
|
||||
} else if (appletItem.isInternalViewSplitter){
|
||||
if(!root.inConfigureAppletsMode)
|
||||
if(!root.inConfigureAppletsMode) {
|
||||
layoutHeight = 0;
|
||||
else
|
||||
layoutHeight = root.iconSize;
|
||||
} else {
|
||||
layoutHeight = (root.isHorizontal ? root.iconSize : Math.min(root.iconSize, 96));
|
||||
}
|
||||
}
|
||||
else if(appletItem.isSystray && root.isHorizontal){
|
||||
layoutHeight = root.iconSize;
|
||||
@ -370,10 +371,11 @@ Item{
|
||||
if (isLattePlasmoid) {
|
||||
return;
|
||||
} else if (appletItem.isInternalViewSplitter){
|
||||
if(!root.inConfigureAppletsMode)
|
||||
if(!root.inConfigureAppletsMode) {
|
||||
layoutWidth = 0;
|
||||
else
|
||||
layoutWidth = root.iconSize;
|
||||
} else {
|
||||
layoutWidth = (root.isVertical ? root.iconSize : Math.min(root.iconSize, 96));
|
||||
}
|
||||
}
|
||||
else if(appletItem.isSystray && root.isVertical){
|
||||
layoutWidth = root.iconSize;
|
||||
@ -600,11 +602,12 @@ Item{
|
||||
anchors.fill: _wrapperContainer
|
||||
active: appletItem.isInternalViewSplitter && root.inConfigureAppletsMode
|
||||
|
||||
rotation: root.isVertical ? 90 : 0
|
||||
|
||||
sourceComponent: PlasmaCore.SvgItem{
|
||||
id:splitterImage
|
||||
anchors.fill: parent
|
||||
anchors.centerIn: parent
|
||||
width: Math.min(wrapper.width, wrapper.height)
|
||||
height: width
|
||||
rotation: root.isVertical ? 90 : 0
|
||||
|
||||
svg: PlasmaCore.Svg{
|
||||
imagePath: root.universalSettings.splitterIconPath()
|
||||
|
@ -133,8 +133,7 @@ MouseArea {
|
||||
previousCurrentApplet = currentApplet;
|
||||
|
||||
if (!currentApplet
|
||||
|| !root.dragOverlay.currentApplet
|
||||
|| (currentApplet && currentApplet.isInternalViewSplitter)) {
|
||||
|| !root.dragOverlay.currentApplet) {
|
||||
hideTimer.restart();
|
||||
return;
|
||||
}
|
||||
@ -276,7 +275,7 @@ MouseArea {
|
||||
Item {
|
||||
id: handleVisualItem
|
||||
width: root.isHorizontal ? parent.width : thickness
|
||||
height: root.isHorizontal ? thickness : parent.width
|
||||
height: root.isHorizontal ? thickness : parent.height
|
||||
|
||||
readonly property int thickness: root.isHorizontal ? parent.height - root.localScreenEdgeMargin : parent.width - root.localScreenEdgeMargin
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user