hefty: bar: put popups in loaders

This commit is contained in:
end-4
2026-03-08 21:02:16 +01:00
parent 7a9b080616
commit 38dbc8769b
5 changed files with 201 additions and 179 deletions
@@ -14,7 +14,7 @@ GridLayout {
readonly property int count: choreographableChildren.length
children: choreographableChildren
property bool shown: true
property bool shown: false
onShownChanged: {
// When hiding, hide all at once
if (!shown) {
@@ -0,0 +1,7 @@
pragma ComponentBehavior: Bound
import QtQuick
FadeLoader {
id: root
onActiveChanged: item.shown = true
}
@@ -5,6 +5,7 @@ import QtQuick.Layouts
Item {
id: root
property alias textWidget: textWidget
property alias text: textWidget.text
property alias horizontalAlignment: textWidget.horizontalAlignment
property alias verticalAlignment: textWidget.verticalAlignment
@@ -27,7 +28,10 @@ Item {
StyledText {
id: textWidget
anchors.horizontalCenter: parent.horizontalCenter
anchors {
left: parent.left
right: parent.right
}
y: {
const value = (parent.height - textMetrics.height) / 2;
return root.lowerBias ? Math.ceil(value) : Math.round(value);