support min/max length and alignments beautifully

--applets that use auto fill calculations to gain their
length work really nice now for all alignments and values
very similar to plasma panels
pull/15/head
Michail Vourlakos 5 years ago
parent 7b1f2f2ef2
commit 9fcec2128a

@ -34,6 +34,7 @@ Ability.LayouterPrivate {
&& (!dragOverlay || (dragOverlay && !dragOverlay.pressed)) /*do not update during moving/dragging applets*/
&& !appletsInParentChange
readonly property bool maxMetricsInHigherPriority: root.minLength === root.maxLength
function updateSizeForAppletsInFill() {
if (!updateSizeForAppletsInFillTimer.running) {

@ -51,16 +51,16 @@ Item {
//! qBound style function that is specialized in Layouts
//! meaning that -1 values are ignored for fillWidth(s)/Height(s)
function layoutBound(min, pref, max){
/* if (max === -1) {
function appletPreferredLength(min, pref, max){
if (max === -1) {
max = pref === -1 ? min : pref;
}
if (pref === -1) {
pref = max === -1 ? min : pref;
}*/
}
return Math.max(min, pref, max);// Math.min(Math.max(min,pref),max);
return Math.min(Math.max(min,pref),max);
}
@ -77,7 +77,7 @@ Item {
//! during step1/pass1 all applets that provide valid metrics (minimum/preferred/maximum values)
//! they gain a valid space in order to draw themeselves
function computeStep1ForLayout(layout, availableSpace, sizePerApplet, noOfApplets) {
function computeStep1ForLayout(layout, availableSpace, sizePerApplet, noOfApplets, inMaxAutoFillCalculations) {
for(var i=0; i<layout.children.length; ++i) {
var curApplet = layout.children[i];
@ -102,14 +102,14 @@ Item {
if (!systemDecide) {
if (noOfApplets>1) {
appliedSize = layoutBound(minSize, prefSize, maxSize);
appliedSize = appletPreferredLength(minSize, prefSize, maxSize);
// console.log( " s3_1 " + curApplet.applet.pluginName + " : (" +minSize+","+prefSize+","+maxSize+") -> " + appliedSize);
} else if (noOfApplets===1) {
//! at this step if only one applet has remained for which the max size is not null,
//! then for this applet we make sure the maximum size does not exceed the available space
//! in order for the applet to not be drawn outside the boundaries
appliedSize = layoutBound(minSize, prefSize, Math.min(maxSize, sizePerApplet));
appliedSize = appletPreferredLength(minSize, prefSize, Math.min(maxSize, sizePerApplet));
// console.log( " s3_2 " + curApplet.applet.pluginName + " : (" +minSize+","+prefSize+","+maxSize+") -> " + appliedSize);
}
@ -122,7 +122,12 @@ Item {
var thickness = root.isVertical ? root.width : root.height;
var adjustedSize = curApplet.isHidden ? 0 : Math.max(thickness, properSize);
if (inMaxAutoFillCalculations) {
curApplet.maxAutoFillLength = adjustedSize;
} else {
curApplet.minAutoFillLength = adjustedSize;
}
curApplet.inFillCalculations = false;
availableSpace = Math.max(0, availableSpace - curApplet.maxAutoFillLength);
noOfApplets = noOfApplets - 1;
@ -143,7 +148,7 @@ Item {
//! during step2/pass2 all the applets with fills
//! that remained with no computations from pass1
//! are updated with the algorithm's proposed size
function computeStep2ForLayout(layout, sizePerApplet, noOfApplets) {
function computeStep2ForLayout(layout, sizePerApplet, noOfApplets, inMaxAutoFillCalculations) {
if (sizePerApplet>=0) {
if (noOfApplets === 0) {
//! when all applets have assigned some size and there is still free space, we must find
@ -171,9 +176,11 @@ Item {
// console.log( " s4_0 " + curApplet.applet.pluginName + " : (" +minSize+","+prefSize+","+maxSize+") ");
if (!isNeutral && maxSize===Infinity && curApplet.maxAutoFillLength>mostDemandingAppletSize) {
if (!isNeutral && maxSize===Infinity
&& ((inMaxAutoFillCalculations && curApplet.maxAutoFillLength>mostDemandingAppletSize)
|| (!inMaxAutoFillCalculations && curApplet.minAutoFillLength>mostDemandingAppletSize) )) {
mostDemandingApplet = curApplet;
mostDemandingAppletSize = curApplet.maxAutoFillLength;
mostDemandingAppletSize = inMaxAutoFillCalculations ? curApplet.maxAutoFillLength : curApplet.minAutoFillLength;
} else if (isNeutral) {
neutralAppletsNo = neutralAppletsNo + 1;
neutralApplets.push(curApplet);
@ -183,7 +190,12 @@ Item {
if (mostDemandingApplet) {
//! the most demanding applet gains all the remaining space
if (inMaxAutoFillCalculations) {
mostDemandingApplet.maxAutoFillLength = mostDemandingApplet.maxAutoFillLength + sizePerApplet;
} else {
mostDemandingApplet.minAutoFillLength = mostDemandingApplet.minAutoFillLength + sizePerApplet;
}
// console.log("s4_1 "+ mostDemandingApplet.applet.pluginName + " assigned: " + mostDemandingApplet.maxAutoFillLength + "\n");
} else if (neutralAppletsNo>0) {
@ -193,7 +205,11 @@ Item {
for (var j=0; j<neutralApplets.length; ++j) {
// console.log("s4_2.0 "+ neutralApplets[j].applet.pluginName + " _ " + neutralApplets[j].maxAutoFillLength + " _ " + adjustedAppletSize);
if (inMaxAutoFillCalculations) {
neutralApplets[j].maxAutoFillLength = neutralApplets[j].maxAutoFillLength + adjustedAppletSize;
} else {
neutralApplets[j].minAutoFillLength = neutralApplets[j].minAutoFillLength + adjustedAppletSize;
}
// console.log("s4_2 "+ neutralApplets[j].applet.pluginName + " assigned: " + sizePerApplet + "\n");
}
@ -203,7 +219,12 @@ Item {
var curApplet = layout.children[i];
if (curApplet && curApplet.isAutoFillApplet && curApplet.inFillCalculations) {
if (inMaxAutoFillCalculations) {
curApplet.maxAutoFillLength = sizePerApplet;
} else {
curApplet.minAutoFillLength = sizePerApplet;
}
// console.log("s4_3 "+ curApplet.applet.pluginName + " assigned: " + sizePerApplet + "\n");
curApplet.inFillCalculations = false;
}
@ -215,7 +236,7 @@ Item {
//! initialize the three layouts and execute the step1/phase1
//! it is used when the Centered (Main)Layout is used only or when the Main(Layout)
//! is empty in Justify mode
function initializationPhase(availableSpace, sizePerApplet, noOfApplets){
function initializationPhase(availableSpace, sizePerApplet, noOfApplets, inMaxAutoFillCalculations){
if (root.panelAlignment === LatteCore.Types.Justify) {
initLayoutForFillsCalculations(startLayout.grid);
initLayoutForFillsCalculations(endLayout.grid);
@ -226,17 +247,17 @@ Item {
//! first pass in order to update sizes for applet that want to fill space
//! but their maximum metrics are lower than the sizePerApplet
var res = computeStep1ForLayout(mainLayout.grid, availableSpace, sizePerApplet, noOfApplets);
var res = computeStep1ForLayout(mainLayout.grid, availableSpace, sizePerApplet, noOfApplets, inMaxAutoFillCalculations);
availableSpace = res[0]; sizePerApplet = res[1]; noOfApplets = res[2];
// console.log( " i1 : " + availableSpace + " _ " + sizePerApplet + " _ " + noOfApplets );
if (root.panelAlignment === LatteCore.Types.Justify) {
res = computeStep1ForLayout(startLayout.grid, availableSpace, sizePerApplet, noOfApplets);
res = computeStep1ForLayout(startLayout.grid, availableSpace, sizePerApplet, noOfApplets, inMaxAutoFillCalculations);
availableSpace = res[0]; sizePerApplet = res[1]; noOfApplets = res[2];
// console.log( " i2 : " + availableSpace + " _ " + sizePerApplet + " _ " + noOfApplets );
res = computeStep1ForLayout(endLayout.grid, availableSpace, sizePerApplet, noOfApplets);
res = computeStep1ForLayout(endLayout.grid, availableSpace, sizePerApplet, noOfApplets, inMaxAutoFillCalculations);
availableSpace = res[0]; sizePerApplet = res[1]; noOfApplets = res[2];
// console.log( " i3 : " + availableSpace + " _ " + sizePerApplet + " _ " + noOfApplets );
}
@ -244,69 +265,17 @@ Item {
return [availableSpace, sizePerApplet, noOfApplets];
}
function _updateSizeForAppletsInFill() {
if (inNormalFillCalculationsState) {
// console.log("-------------");
// console.log("s1...");
function updateFillAppletsWithTwoSteps(inMaxAutoFillCalculations) {
var noA = startLayout.fillApplets + mainLayout.fillApplets + endLayout.fillApplets;
var max_length = inMaxAutoFillCalculations ? root.maxLength : root.minLength
if (noA === 0)
return;
// console.log("s2...");
if (mainLayout.shownApplets === 0 || root.panelAlignment !== LatteCore.Types.Justify) {
// console.log(" S2 _ SIZES ::: " + maxLength + " ___ " + startLayout.sizeWithNoFillApplets + " ___ " + mainLayout.sizeWithNoFillApplets + " ___ " + endLayout.sizeWithNoFillApplets);
var availableSpace = Math.max(0, maxLength - startLayout.sizeWithNoFillApplets - mainLayout.sizeWithNoFillApplets - endLayout.sizeWithNoFillApplets - root.panelEdgeSpacing);
var sizePerApplet = availableSpace / noA;
var res = initializationPhase(availableSpace, sizePerApplet, noA);
availableSpace = res[0]; sizePerApplet = res[1]; noA = res[2];
// console.log("s4...");
//! after step1 there is a chance that all applets were assigned a valid space
//! but at the same time some space remained free. In such case we make sure
//! that remained space will be assigned to the most demanding applet.
//! This is achieved by <layout>No values. For step2 passing value!=0
//! means default step2 behavior BUT value=0 means that remained space
//! must be also assigned at the end.
var remainedSpace = (noA === 0 && sizePerApplet > 0) ? true : false
var startNo = -1;
var mainNo = -1;
var endNo = -1;
if (remainedSpace) {
if (startLayout.fillApplets > 0) {
startNo = 0;
} else if (lendLayout.fillApplets > 0) {
endNo = 0;
} else if (mainLayout.fillApplets > 0) {
mainNo = 0;
}
}
//! second pass in order to update sizes for applet that want to fill space
//! these applets get the direct division of the available free space that
//! remained from step1 OR the the free available space that no applet requested yet
computeStep2ForLayout(startLayout.grid, sizePerApplet, startNo); //default behavior
computeStep2ForLayout(mainLayout.grid, sizePerApplet, mainNo); //default behavior
computeStep2ForLayout(endLayout.grid, sizePerApplet, endNo); //default behavior
//console.log("s5...");
} else {
//! Justify mode in all remaining cases
// console.log(" S3 _ SIZES ::: " + root.maxLength + " ___ " + startLayout.sizeWithNoFillApplets + " ___ " + mainLayout.sizeWithNoFillApplets + " ___ " + endLayout.sizeWithNoFillApplets);
// console.log(" S3 _ SIZES ::: " + max_length + " ___ " + inMaxAutoFillCalculations + " __ " + startLayout.sizeWithNoFillApplets + " ___ " + mainLayout.sizeWithNoFillApplets + " ___ " + endLayout.sizeWithNoFillApplets);
//! compute the two free spaces around the centered layout
//! they are called start and end accordingly
var halfMainLayout = mainLayout.sizeWithNoFillApplets / 2;
var availableSpaceStart = Math.max(0, maxLength/2 - startLayout.sizeWithNoFillApplets - halfMainLayout - root.panelEdgeSpacing/2);
var availableSpaceEnd = Math.max(0, maxLength/2 - endLayout.sizeWithNoFillApplets - halfMainLayout - root.panelEdgeSpacing/2);
var availableSpaceStart = Math.max(0, max_length/2 - startLayout.sizeWithNoFillApplets - halfMainLayout - root.panelEdgeSpacing/2);
var availableSpaceEnd = Math.max(0, max_length/2 - endLayout.sizeWithNoFillApplets - halfMainLayout - root.panelEdgeSpacing/2);
var availableSpace;
if (mainLayout.fillApplets === 0 || (startLayout.shownApplets ===0 && endLayout.shownApplets===0)){
@ -324,15 +293,15 @@ Item {
var noEnd = endLayout.fillApplets;
//! initialize the computations
initLayoutForFillsCalculations(startLayout.grid);
initLayoutForFillsCalculations(mainLayout.grid);
initLayoutForFillsCalculations(endLayout.grid);
initLayoutForFillsCalculations(startLayout.grid, inMaxAutoFillCalculations);
initLayoutForFillsCalculations(mainLayout.grid, inMaxAutoFillCalculations);
initLayoutForFillsCalculations(endLayout.grid, inMaxAutoFillCalculations);
var res;
//! first pass
if (mainLayout.fillApplets > 0){
res = computeStep1ForLayout(mainLayout.grid, availableSpace, sizePerAppletMain, noMain);
res = computeStep1ForLayout(mainLayout.grid, availableSpace, sizePerAppletMain, noMain, inMaxAutoFillCalculations);
sizePerAppletMain = res[1]; noMain = res[2];
var dif = (availableSpace - res[0]) / 2;
availableSpaceStart = availableSpaceStart - dif;
@ -343,11 +312,11 @@ Item {
var sizePerAppletEnd = endLayout.fillApplets > 0 ? availableSpaceEnd / noEnd : 0 ;
if (startLayout.fillApplets > 0) {
res = computeStep1ForLayout(startLayout.grid, availableSpaceStart, sizePerAppletStart, noStart);
res = computeStep1ForLayout(startLayout.grid, availableSpaceStart, sizePerAppletStart, noStart, inMaxAutoFillCalculations);
availableSpaceStart = res[0]; sizePerAppletStart = res[1]; noStart = res[2];
}
if (endLayout.fillApplets > 0) {
res = computeStep1ForLayout(endLayout.grid, availableSpaceEnd, sizePerAppletEnd, noEnd);
res = computeStep1ForLayout(endLayout.grid, availableSpaceEnd, sizePerAppletEnd, noEnd, inMaxAutoFillCalculations);
availableSpaceEnd = res[0]; sizePerAppletEnd = res[1]; noEnd = res[2];
}
@ -357,26 +326,96 @@ Item {
// console.log(" S ::: " +startLayout.fillApplets + " _ " + sizePerAppletStart + " _ " + noStart);
if (mainLayout.fillApplets > 0) {
computeStep2ForLayout(mainLayout.grid, sizePerAppletMain, noMain); //default behavior
computeStep2ForLayout(mainLayout.grid, sizePerAppletMain, noMain, inMaxAutoFillCalculations); //default behavior
}
if (startLayout.fillApplets > 0) {
if (mainLayout.fillApplets > 0) {
//! adjust final fill applet size in mainlayouts final length
sizePerAppletStart = ((maxLength/2) - (mainLayout.grid.length/2) - startLayout.sizeWithNoFillApplets) / noStart;
sizePerAppletStart = ((max_length/2) - (mainLayout.grid.length/2) - startLayout.sizeWithNoFillApplets) / noStart;
}
computeStep2ForLayout(startLayout.grid, sizePerAppletStart, noStart);
computeStep2ForLayout(startLayout.grid, sizePerAppletStart, noStart, inMaxAutoFillCalculations);
}
if (endLayout.fillApplets > 0) {
if (mainLayout.fillApplets > 0) {
//! adjust final fill applet size in mainlayouts final length
sizePerAppletEnd = ((maxLength/2) - (mainLayout.grid.length/2) - endLayout.sizeWithNoFillApplets) / noEnd;
sizePerAppletEnd = ((max_length/2) - (mainLayout.grid.length/2) - endLayout.sizeWithNoFillApplets) / noEnd;
}
computeStep2ForLayout(endLayout.grid, sizePerAppletEnd, noEnd, inMaxAutoFillCalculations);
}
}
function updateFillAppletsWithOneStep(inMaxAutoFillCalculations) {
var max_length = inMaxAutoFillCalculations ? root.maxLength : root.minLength
var noA = startLayout.fillApplets + mainLayout.fillApplets + endLayout.fillApplets;
// console.log(" S2 _ SIZES ::: " + max_length + " ___ " + inMaxAutoFillCalculations + " __ " + startLayout.sizeWithNoFillApplets + " ___ " + mainLayout.sizeWithNoFillApplets + " ___ " + endLayout.sizeWithNoFillApplets);
var availableSpace = Math.max(0, max_length - startLayout.sizeWithNoFillApplets - mainLayout.sizeWithNoFillApplets - endLayout.sizeWithNoFillApplets - root.panelEdgeSpacing);
var sizePerApplet = availableSpace / noA;
var res = initializationPhase(availableSpace, sizePerApplet, noA, inMaxAutoFillCalculations);
availableSpace = res[0]; sizePerApplet = res[1]; noA = res[2];
// console.log("s4...");
//! after step1 there is a chance that all applets were assigned a valid space
//! but at the same time some space remained free. In such case we make sure
//! that remained space will be assigned to the most demanding applet.
//! This is achieved by <layout>No values. For step2 passing value!=0
//! means default step2 behavior BUT value=0 means that remained space
//! must be also assigned at the end.
var remainedSpace = (noA === 0 && sizePerApplet > 0) ? true : false
var startNo = -1;
var mainNo = -1;
var endNo = -1;
if (remainedSpace) {
if (startLayout.fillApplets > 0) {
startNo = 0;
} else if (lendLayout.fillApplets > 0) {
endNo = 0;
} else if (mainLayout.fillApplets > 0) {
mainNo = 0;
}
}
computeStep2ForLayout(endLayout.grid, sizePerAppletEnd, noEnd);
//! second pass in order to update sizes for applet that want to fill space
//! these applets get the direct division of the available free space that
//! remained from step1 OR the the free available space that no applet requested yet
computeStep2ForLayout(startLayout.grid, sizePerApplet, startNo, inMaxAutoFillCalculations); //default behavior
computeStep2ForLayout(mainLayout.grid, sizePerApplet, mainNo, inMaxAutoFillCalculations); //default behavior
computeStep2ForLayout(endLayout.grid, sizePerApplet, endNo, inMaxAutoFillCalculations); //default behavior
//console.log("s5...");
}
function _updateSizeForAppletsInFill() {
if (inNormalFillCalculationsState) {
// console.log("-------------");
// console.log("s1...");
var noA = startLayout.fillApplets + mainLayout.fillApplets + endLayout.fillApplets;
if (noA === 0) {
return;
}
var use_maximum_length = true;
if (mainLayout.shownApplets === 0 || root.panelAlignment !== LatteCore.Types.Justify) {
updateFillAppletsWithOneStep(use_maximum_length);
updateFillAppletsWithOneStep(!use_maximum_length);
} else {
//! Justify mode in all remaining cases
updateFillAppletsWithTwoSteps(use_maximum_length);
updateFillAppletsWithTwoSteps(!use_maximum_length);
}
}
}

@ -67,6 +67,7 @@ Item {
return false;
}
property int maxAutoFillLength: -1 //it is used in calculations for fillWidth,fillHeight applets
property int minAutoFillLength: -1 //it is used in calculations for fillWidth,fillHeight applets
property bool userBlocksColorizing: false
property bool appletBlocksColorizing: !communicator.requires.latteSideColoringEnabled
@ -698,7 +699,6 @@ Item {
wrapper.disableThicknessScale = false;
wrapper.updateLength();
wrapper.updateThickness();
} else if (overlayLatteIconIsActive && applet.opacity>0) {
applet.opacity = 0;
@ -711,7 +711,6 @@ Item {
wrapper.disableThicknessScale = false;
wrapper.updateLength();
wrapper.updateThickness();
}
}
}
@ -1088,8 +1087,16 @@ Item {
active: root.debugModeLayouter
sourceComponent: Debug.Tag{
label.text: (root.isHorizontal ? appletItem.width : appletItem.height) + " / fill_size:"+appletItem.maxAutoFillLength
label.text: (root.isHorizontal ? appletItem.width : appletItem.height) + labeltext
label.color: appletItem.isAutoFillApplet ? "green" : "white"
readonly property string labeltext: {
if (appletItem.isAutoFillApplet) {
return " / max_fill:"+appletItem.maxAutoFillLength + " / min_fill:"+appletItem.minAutoFillLength;
}
return "";
}
}
}

@ -44,8 +44,9 @@ Item{
return -1;
}
if (appletItem.isAutoFillApplet && appletItem.maxAutoFillLength>-1) {
return appletItem.maxAutoFillLength;
if (appletItem.isAutoFillApplet) {
return appletItem.layouter.maxMetricsInHigherPriority ?
appletItem.maxAutoFillLength : Math.max(appletItem.minAutoFillLength, appletPreferredLength);
}
if (appletItem.latteApplet) {
@ -79,14 +80,14 @@ Item{
property int appletWidth: applet ? applet.width : -1
property int appletHeight: applet ? applet.height : -1
property int appletMinimumWidth: applet && applet.Layout ? applet.Layout.minimumWidth : metrics.iconSize
property int appletMinimumHeight: applet && applet.Layout ? applet.Layout.minimumHeight : metrics.iconSize
property int appletMinimumWidth: applet && applet.Layout ? applet.Layout.minimumWidth : -1
property int appletMinimumHeight: applet && applet.Layout ? applet.Layout.minimumHeight : -1
property int appletPreferredWidth: applet && applet.Layout ? applet.Layout.preferredWidth : metrics.iconSize
property int appletPreferredHeight: applet && applet.Layout ? applet.Layout.preferredHeight : metrics.iconSize
property int appletPreferredWidth: applet && applet.Layout ? applet.Layout.preferredWidth : -1
property int appletPreferredHeight: applet && applet.Layout ? applet.Layout.preferredHeight : -1
property int appletMaximumWidth: applet && applet.Layout ? applet.Layout.maximumWidth : metrics.iconSize
property int appletMaximumHeight: applet && applet.Layout ? applet.Layout.maximumHeight : metrics.iconSize
property int appletMaximumWidth: applet && applet.Layout ? applet.Layout.maximumWidth : -1
property int appletMaximumHeight: applet && applet.Layout ? applet.Layout.maximumHeight : -1
readonly property int appletLength: root.isHorizontal ? appletWidth : appletHeight
readonly property int appletThickness: root.isHorizontal ? appletHeight : appletWidth
@ -99,12 +100,8 @@ Item{
property int iconSize: appletItem.metrics.iconSize
property int marginsLength: root.isVertical ?
(root.inFullJustify && atScreenEdge && !parabolicEffectMarginsEnabled ? edgeLengthMargins : localLengthMargins) : //Fitt's Law
appletItem.metrics.totals.thicknessEdges
property int marginsThickness: root.isHorizontal ?
(root.inFullJustify && atScreenEdge && !parabolicEffectMarginsEnabled ? edgeLengthMargins : localLengthMargins) : //Fitt's Law
appletItem.metrics.totals.thicknessEdges
property int marginsThickness: appletItem.metrics.totals.thicknessEdges
property int marginsLength: root.inFullJustify && atScreenEdge && !parabolicEffectMarginsEnabled ? edgeLengthMargins : localLengthMargins //Fitt's Law
property int localLengthMargins: isSeparator || !communicator.requires.lengthMarginsEnabled || isInternalViewSplitter ? 0 : appletItem.lengthAppletFullMargins
property int edgeLengthMargins: edgeLengthMarginsDisabled ? 0 : appletItem.lengthAppletPadding * 2
@ -202,32 +199,25 @@ Item{
if(zoomScale === 1) {
checkCanBeHovered();
}
updateThickness();
}
onAppletPreferredLengthChanged: updateLength();
onAppletPreferredThicknessChanged: updateThickness();
onAppletMaximumLengthChanged: updateLength();
onAppletMaximumThicknessChanged: updateThickness();
Connections {
target: appletItem
onCanBeHoveredChanged: {
updateLength();
updateThickness();
}
}
onIconSizeChanged: {
updateLength();
updateThickness();
}
onEditModeChanged: {
updateLength();
updateThickness();
}
onZoomScaleChanged: {
@ -252,9 +242,20 @@ Item{
}
wrapper.disableLengthScale = false;
updateLength();
updateThickness();
}
}
Binding {
target: wrapper
property: "layoutThickness"
when: !isLattePlasmoid
value: {
if (appletItem.isInternalViewSplitter){
return !root.inConfigureAppletsMode ? 0 : appletItem.metrics.iconSize;
}
return appletItem.metrics.iconSize;
}
}
@ -306,18 +307,6 @@ Item{
}
}
function updateThickness() {
appletItem.movingForResize = true;
if (isLattePlasmoid) {
return;
} else if (appletItem.isInternalViewSplitter){
layoutThickness = !root.inConfigureAppletsMode ? 0 : appletItem.metrics.iconSize;
} else {
layoutThickness = appletItem.metrics.iconSize;
}
}
Item{
id:_wrapperContainer

@ -260,6 +260,10 @@ Item {
property real maxLengthPerCentage: hideLengthScreenGaps ? 100 : plasmoid.configuration.maxLength
property int minLength: {
if (root.panelAlignment === LatteCore.Types.Justify) {
return maxLength;
}
if (root.isHorizontal) {
return behaveAsPlasmaPanel && LatteCore.WindowSystem.compositingActive ? width : width * (minLengthPerCentage/100)
} else {

Loading…
Cancel
Save