How to make ProgressIndicator wide as the window #4950
Answered
by
realroot2185
realroot2185
asked this question in
Q&A
-
appwindow.slint: import { TextEdit, Button, VerticalBox, ProgressIndicator } from "std-widgets.slint";
export component App inherits Window {
width: 400px;
height: 300px;
//horizontal-stretch: 1;
in-out property<float> prog: 0.42;
callback request-toggle();
background: black;
VerticalBox {
bar := ProgressIndicator {
//horizontal-stretch: 1;
width: root.width;
height: root.height;
progress: prog;
}
Button {
text: "Increase value";
clicked => {
root.request-toggle();
}
}
}
} The bar does not change when I resize the window. If I use preferred-width/height for |
Beta Was this translation helpful? Give feedback.
Answered by
realroot2185
Mar 27, 2024
Replies: 1 comment 1 reply
-
Try removing |
Beta Was this translation helpful? Give feedback.
1 reply
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
I needed to remove them too for
App
.Otherwise when resizing the window
ProgressIndicator
is not updated.