fix: retain instruction layouts across countdown transitions
This commit is contained in:
@@ -111,7 +111,8 @@ export component AppWindow inherits Window {
|
||||
|
||||
// Wrap the text before sizing the panel, with consistent scaled padding.
|
||||
panel := Rectangle {
|
||||
visible: root.countdown == 0 && !root.awaiting-release;
|
||||
// Keep layout alive while hidden so wrapped text does not reflow on return.
|
||||
opacity: root.countdown == 0 && !root.awaiting-release ? 1 : 0;
|
||||
x: root.safe-area-insets.left + (root.width - root.safe-area-insets.left - root.safe-area-insets.right - self.width) / 2;
|
||||
y: root.height - self.height - root.inset - root.safe-area-insets.bottom;
|
||||
width: min(1040px * root.ui-scale, root.width - root.inset * 2 - root.safe-area-insets.left - root.safe-area-insets.right);
|
||||
@@ -152,7 +153,9 @@ export component AppWindow inherits Window {
|
||||
vertical-alignment: center;
|
||||
}
|
||||
|
||||
if root.awaiting-release: Rectangle {
|
||||
Rectangle {
|
||||
// Allocate and measure this prompt once, before the first countdown.
|
||||
opacity: root.awaiting-release ? 1 : 0;
|
||||
x: (root.width - self.width) / 2;
|
||||
y: root.height - self.height - root.inset - root.safe-area-insets.bottom;
|
||||
width: panel.width;
|
||||
|
||||
Reference in New Issue
Block a user