Index: sources/gui/qml/components/Footer.qml =================================================================== diff -u -r27cc308ff5113a9386899d3c8f8b29962a8498e1 -r13e65c3d271d503c2e2e2f1f20736652c470f8cc --- sources/gui/qml/components/Footer.qml (.../Footer.qml) (revision 27cc308ff5113a9386899d3c8f8b29962a8498e1) +++ sources/gui/qml/components/Footer.qml (.../Footer.qml) (revision 13e65c3d271d503c2e2e2f1f20736652c470f8cc) @@ -35,26 +35,38 @@ property int spacing : 0 } - // this code will run once and will not run for each child, - // that's becuase the available property to add children is the children property - // and that property can only change by assigning a list to it. - // so it happens once with no performance issue of multiple redundant call. - onVisibleChanged: { + function update() { // check there is a child let count = childrenCount if ( ! count ) return let width = childrenWidth - let spacing = (_root.width - (width * count)) / (count + 1) + let visibleCount = 0 for (let i = 0; i < count; i++) { - if (children[i].width !== width) { - children[i].width = width + console.debug(children[i].text.text) + if ( children[i].visible ) { + + visibleCount += 1 + if (children[i].width !== width) { + children[i].width = width + } } + else { + children[i].width = 0 + } } + let spacing = (_root.width - (width * visibleCount)) / (visibleCount + 1) + console.debug( " ~~~~~~~~~~ ", count, visibleCount, spacing) _private.spacing = spacing } + // this code will run once and will not run for each child, + // that's becuase the available property to add children is the children property + // and that property can only change by assigning a list to it. + // so it happens once with no performance issue of multiple redundant call. + onVisibleChanged : update() + spacing : _private.spacing rightPadding : _private.spacing leftPadding : _private.spacing