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

Fix stretched yaru togglables #490

Merged
merged 1 commit into from
Jan 11, 2023
Merged

Fix stretched yaru togglables #490

merged 1 commit into from
Jan 11, 2023

Conversation

Jupi007
Copy link
Member

@Jupi007 Jupi007 commented Jan 11, 2023

  • Center the painter to fix the stretch effect ;
  • Add RepaintBoundary widget around the painter to keep a sharp look ;
  • Correct weird logic of putting a Padding in a SizedBox, which was require to add up padding value to the dimensions.

@jpnurmi as you can see, I'm now using a personal fork ;)

Before:

Capture d’écran du 2023-01-11 11-24-23

After:

Capture d’écran du 2023-01-11 11-19-47

Pull request checklist

  • This PR does not introduce visual changes

Fixes #484

@Jupi007 Jupi007 requested a review from jpnurmi January 11, 2023 10:40
Copy link
Member

@jpnurmi jpnurmi left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks, LGTM! 👍

Is the RepaintBoundary absolutely necessary? The Material toggleables don't seem to use one either. I git a bit cautious because I debugged earlier what it does under the hood...

@Feichtmeier Feichtmeier merged commit c16a14b into ubuntu:main Jan 11, 2023
@Jupi007 Jupi007 deleted the Jupi007/issue484 branch January 11, 2023 11:15
@Jupi007
Copy link
Member Author

Jupi007 commented Jan 11, 2023

Is the RepaintBoundary absolutely necessary? The Material toggleables don't seem to use one either. I git a bit cautious because I debugged earlier what it does under the hood...

Well yes, because the togglable becomes blurry in the horizontal direction without one.
And I sadly don't know any other way to fix that problem...

@jpnurmi
Copy link
Member

jpnurmi commented Jan 11, 2023

Well yes, because the togglable becomes blurry in the horizontal direction without one.

Does it happen with the Material togglables too?

And I sadly don't know any other way to fix that problem...

I think it's more like a coincidence that RepaintBoundary force-aligns to pixels because it creates a separate GtkWidget that cannot have floating point coordinates. It's just that using this trick for every checkbox is almost like creating floating GTK checkboxes on top of the Flutter view. 😀

@Jupi007
Copy link
Member Author

Jupi007 commented Jan 11, 2023

Does it happen with the Material togglables too?

Well no, and I don't understand why, but material togglables are not affected by the pixel alignment problem.

I think it's more like a coincidence that RepaintBoundary force-aligns to pixels because it creates a separate GtkWidget that cannot have floating point coordinates. It's just that using this trick for every checkbox is almost like creating floating GTK checkboxes on top of the Flutter view. grinning

I will try to find another solution then.

This was referenced Jan 11, 2023
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.

Checkbox, Radio, and Switch stretch
3 participants