From 8a3239c9243ed0d61cb9008deec65ee75b0f0c22 Mon Sep 17 00:00:00 2001 From: Michail Vourlakos Date: Sun, 18 Mar 2018 16:31:57 +0200 Subject: [PATCH] fix #913,update Justify calculations in editMode --in Justify alignment fillWidth(s)/Height(s) applets may exist. In such case the calculations for their values should be activated because there is a chance that the panel contents would go out of bounds and out of screen. This way we make sure that all contents will be always visible. --- containment/package/contents/ui/LayoutsContainer.qml | 4 +++- .../package/contents/ui/applet/AppletItemWrapper.qml | 11 ++--------- 2 files changed, 5 insertions(+), 10 deletions(-) diff --git a/containment/package/contents/ui/LayoutsContainer.qml b/containment/package/contents/ui/LayoutsContainer.qml index 1ef4389a6..7cf692bfe 100644 --- a/containment/package/contents/ui/LayoutsContainer.qml +++ b/containment/package/contents/ui/LayoutsContainer.qml @@ -313,7 +313,9 @@ Item{ property:"sizeWithNoFillApplets" when: _mainLayout value: { - if (!visibilityManager || !visibilityManager.normalState) + //! in EditMode we must update that size because the user may add new applets + //! and the contents may go out of bounds + if (!visibilityManager || (!visibilityManager.normalState && !root.editMode)) return; var space = 0; diff --git a/containment/package/contents/ui/applet/AppletItemWrapper.qml b/containment/package/contents/ui/applet/AppletItemWrapper.qml index 7c22b56cd..53c7fdeb8 100644 --- a/containment/package/contents/ui/applet/AppletItemWrapper.qml +++ b/containment/package/contents/ui/applet/AppletItemWrapper.qml @@ -44,10 +44,7 @@ Item{ } if (container.needsFillSpace && (container.sizeForFill>-1) && root.isHorizontal){ - //! in edit mode shrink a bit the fill sizes because the splitters are shown - return root.editMode && container.needsFillSpace && (container.sizeForFill > 5*root.iconSize) ? - container.sizeForFill - 2.5*root.iconSize : container.sizeForFill; - //return container.sizeForFill; + return container.sizeForFill; } if (container.latteApplet) { @@ -75,11 +72,7 @@ Item{ } if (container.needsFillSpace && (container.sizeForFill>-1) && root.isVertical){ - //! in edit mode shrink a bit the fill sizes because the splitters are shown - return root.editMode && container.needsFillSpace && (container.sizeForFill > 5*root.iconSize) ? - container.sizeForFill - 2.5*root.iconSize : container.sizeForFill; - - //return container.sizeForFill; + return container.sizeForFill; } if (container.latteApplet) {