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

Convenience const fn for Margin, Rounding and Shadow #4080

Merged
merged 5 commits into from
Feb 21, 2024

Conversation

0Qwel
Copy link
Contributor

@0Qwel 0Qwel commented Feb 20, 2024

I often write constants at the top of my widget files, as a "config". I kept writing stuff like that :

const DEFAULT_INNER_MARGIN: Margin = Margin { left: 17., right: 17., top: 7., bottom: 7. };

So I prefixed constructors for Margin, Rounding and Shadow const. No code was changed.

I also added a Shadow::new() for similar reasons.

@0Qwel 0Qwel marked this pull request as draft February 20, 2024 19:00
@0Qwel 0Qwel marked this pull request as ready for review February 20, 2024 19:43
@emilk emilk merged commit 23e8312 into emilk:master Feb 21, 2024
21 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants