-
Notifications
You must be signed in to change notification settings - Fork 23
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Use the ProgressIndicator from Slint instead of the self-made one #21
Conversation
Screen.Recording.2023-09-19.at.15.55.32.mov |
width: parent.width / 2; | ||
x: parent.width - self.width - 6px; | ||
height: parent.height - 6px; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Should this positioning be preserved somehow?
Right now element is just placed in the layout and we let the layout decide on the margin/spacing. Kind of easy.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
On the screenshot, the progressbar seems to extand more than the text in both direction. I suppose it would look better if they had the same margin. Maybe you just need to put the ProgressIndicator in a HorizontalBox.
Or the whole thing in a GridBox with visible: condition;
instead of if condition:
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Good idea, will try that.
ui/install.slint
Outdated
@@ -5,7 +5,7 @@ | |||
import { | |||
ComboBox, VerticalBox, HorizontalBox, GridBox, Button, | |||
LineEdit, ListView, GroupBox, CheckBox | |||
} from "std-widgets.slint"; | |||
, ProgressIndicator} from "std-widgets.slint"; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I guess the LSP created this terrible formatting?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Heh yes. I'll make it less terrible :)
width: parent.width / 2; | ||
x: parent.width - self.width - 6px; | ||
height: parent.height - 6px; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
On the screenshot, the progressbar seems to extand more than the text in both direction. I suppose it would look better if they had the same margin. Maybe you just need to put the ProgressIndicator in a HorizontalBox.
Or the whole thing in a GridBox with visible: condition;
instead of if condition:
37eadaf
to
66489f7
Compare
This way it is styled in the same way as the surrounding controls (such as the button).
66489f7
to
aded25d
Compare
Looks indeed better with margins. I couldn't get GridBox to work because the first Row with the Text elements has conditionals that aren't supported. This seems indeed easier. Screen.Recording.2023-09-19.at.16.45.39.mov |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I couldn't get GridBox to work because the first Row with the Text elements has conditionals that aren't supported.
hence my suggestion to use visible
instead. But visible:false leave some padding in the layout that is not ideal. The HorizontalBox is clean enough.
This way it is styled in the same way as the surrounding controls (such as the button).