From c9aa147b7b5c4b457d8ca5c259fbae241f0c98c5 Mon Sep 17 00:00:00 2001 From: Michail Vourlakos Date: Tue, 4 Jan 2022 00:56:44 +0200 Subject: [PATCH] justify:update centered offset always --- .../contents/ui/layouts/LayoutsContainer.qml | 22 +------------------ 1 file changed, 1 insertion(+), 21 deletions(-) diff --git a/containment/package/contents/ui/layouts/LayoutsContainer.qml b/containment/package/contents/ui/layouts/LayoutsContainer.qml index fcfb7bab4..a0ab8ce42 100644 --- a/containment/package/contents/ui/layouts/LayoutsContainer.qml +++ b/containment/package/contents/ui/layouts/LayoutsContainer.qml @@ -293,10 +293,6 @@ Item{ readonly property bool centered: (root.myView.alignment === LatteCore.Types.Center) || (root.myView.alignment === LatteCore.Types.Justify) readonly property bool reversed: Qt.application.layoutDirection === Qt.RightToLeft - - //! do not update during dragging/moving applets inConfigureAppletsMode - readonly property bool offsetUpdateIsBlocked: ((root.dragOverlay && root.dragOverlay.pressed) || layouter.appletsInParentChange) - property bool isCoveredFromBothSideLayouts: false property int inJustifyCenterOffset: 0 alignment: { @@ -351,26 +347,10 @@ Item{ } } - Binding{ - target: _mainLayout - property:"isCoveredFromBothSideLayouts" - when: !_mainLayout.offsetUpdateIsBlocked && layouter.inNormalFillCalculationsState - value: { - if (!layouter.mainLayout.onlyInternalSplitters && !_mainLayout.offsetUpdateIsBlocked) { - //! one of side layouts goes underneath the main layout when the main layout contains valid applets - var limit = (root.maxLength - mainLayout.length)/2; - return ((startLayout.length > limit ) && (endLayout.length > limit)); - } - - //! start and end layouts length exceed the maximum length - return (startLayout.length + endLayout.length) > (root.maxLength); - } - } - Binding{ target: _mainLayout property:"inJustifyCenterOffset" - when: !_mainLayout.offsetUpdateIsBlocked && layouter.inNormalFillCalculationsState + when: !layouter.appletsInParentChange && layouter.inNormalFillCalculationsState value: { if (root.myView.alignment !== LatteCore.Types.Justify) { return 0;