Skip to content
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

live-preview: Fix size being displayed wrongly #6134

Merged
merged 1 commit into from
Sep 16, 2024

Conversation

hunger
Copy link
Member

@hunger hunger commented Sep 13, 2024

Stop abusing the init callback, abuse the changed callback instead ;-)

Also merge the initial size calculation into one place. This fixes the preview showing the wrong sizes. It does introduce a bit of flicker though as the UI is rendered in the wrong state once and then immediently corrects itself.

That is annoying, but strictly better than staying in the wrong state till the user does something.

Closes: #5954

Stop abusing the init callback, abuse the changed callback instead ;-)

Also merge the initial size calculation into one place. This fixes the
preview showing the wrong sizes. It does introduce a bit of flicker though
as the UI is rendered in the wrong state once and then immediently corrects
itself.

That is annoying, but strictly better than staying in the wrong state till
the user does something.

Closes: slint-ui#5954
@hunger hunger force-pushed the tobias/push-oxplzuwuuwrl branch from 269a150 to b74554c Compare September 16, 2024 12:57
@hunger hunger merged commit 1ca3726 into slint-ui:master Sep 16, 2024
36 checks passed
@hunger hunger deleted the tobias/push-oxplzuwuuwrl branch September 16, 2024 13:54
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Preview: when clicking "show preview" the size of the preview adjust but not the frame
2 participants