1
0
mirror of https://github.com/KDE/latte-dock.git synced 2024-12-24 17:33:50 +03:00

not CanFillArea applets behabe as MarginsSeparators

This commit is contained in:
Michail Vourlakos 2021-02-27 11:22:59 +02:00
parent 69f466fd2f
commit aaf562a207
2 changed files with 10 additions and 11 deletions

View File

@ -57,7 +57,7 @@ Item {
readonly property bool canFillScreenEdge: communicator.requires.screenEdgeMarginSupported || communicator.indexerIsSupported readonly property bool canFillScreenEdge: communicator.requires.screenEdgeMarginSupported || communicator.indexerIsSupported
readonly property bool canFillThickness: applet && applet.hasOwnProperty("constraintHints") && (applet.constraintHints & PlasmaCore.Types.CanFillArea); readonly property bool canFillThickness: applet && applet.hasOwnProperty("constraintHints") && (applet.constraintHints & PlasmaCore.Types.CanFillArea);
readonly property bool isMarginsAreaSeparator: applet && applet.hasOwnProperty("constraintHints") && (applet.constraintHints & PlasmaCore.Types.MarginAreasSeparator); readonly property bool isMarginsAreaSeparator: applet && applet.pluginName === "org.kde.plasma.marginsseparator"
readonly property color highlightColor: theme.buttonFocusColor readonly property color highlightColor: theme.buttonFocusColor
@ -66,16 +66,16 @@ Item {
property bool isAutoFillApplet: isRequestingFill property bool isAutoFillApplet: isRequestingFill
property bool isRequestingFill: { property bool isRequestingFill: {
if (!applet || !applet.Layout) if (!applet || !applet.Layout) {
return false;
if (((root.isHorizontal && applet.Layout.fillWidth===true)
|| (root.isVertical && applet.Layout.fillHeight===true))
&& (!isHidden)) {
return true;
} else {
return false; return false;
} }
if ((root.isHorizontal && applet.Layout.fillWidth===true)
|| (root.isVertical && applet.Layout.fillHeight===true)) {
return !isHidden;
}
return false;
} }
property int maxAutoFillLength: -1 //it is used in calculations for fillWidth,fillHeight applets property int maxAutoFillLength: -1 //it is used in calculations for fillWidth,fillHeight applets

View File

@ -46,7 +46,7 @@ Item{
} }
} }
if ((isSeparator || appletItem.isMarginsAreaSeparator) && appletItem.parabolic.isEnabled) { if ((isSeparator || isMarginsAreaSeparator) && appletItem.parabolic.isEnabled) {
return -1; return -1;
} }
@ -58,7 +58,6 @@ Item{
} }
var result = Math.max(appletItem.minAutoFillLength,Math.min(appletPreferredLength,appletItem.maxAutoFillLength)); var result = Math.max(appletItem.minAutoFillLength,Math.min(appletPreferredLength,appletItem.maxAutoFillLength));
return isInternalViewSplitter? result + 1 : result; return isInternalViewSplitter? result + 1 : result;
} }