From 074eeafe61051361446bc1766205fcf24257a44e Mon Sep 17 00:00:00 2001 From: Eism Date: Tue, 15 Oct 2024 15:21:19 +0300 Subject: [PATCH] manually calculation of children width we can't limit flow width by parent width for calculating children width, because we need inverse dependency --- .../qml/Muse/UiComponents/StyledToolBarView.qml | 17 +++++++++++++++++ 1 file changed, 17 insertions(+) diff --git a/src/framework/uicomponents/qml/Muse/UiComponents/StyledToolBarView.qml b/src/framework/uicomponents/qml/Muse/UiComponents/StyledToolBarView.qml index cb7206df66989..7784f06ef971d 100644 --- a/src/framework/uicomponents/qml/Muse/UiComponents/StyledToolBarView.qml +++ b/src/framework/uicomponents/qml/Muse/UiComponents/StyledToolBarView.qml @@ -63,6 +63,23 @@ Rectangle { anchors.verticalCenter: parent.verticalCenter + width: { + var result = 0 + var children = content.children + + for (var i = 0; i < children.length; ++i) { + result += children[i].width + spacing + + } + + if (result > 0) { + result -= spacing + } + + return result + } + height: childrenRect.height + clip: true spacing: 4