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

Add align_x and align_y helpers to Scrollable #2499

Merged
merged 1 commit into from
Jul 11, 2024

Conversation

hecrj
Copy link
Member

@hecrj hecrj commented Jul 11, 2024

These helpers can come in handy when you only want to change the alignment of a Scrollable without changing its direction.

@hecrj hecrj added feature New feature or request widget addition labels Jul 11, 2024
@hecrj hecrj added this to the 0.13 milestone Jul 11, 2024
@hecrj hecrj enabled auto-merge July 11, 2024 02:38
@hecrj hecrj merged commit 12bebba into master Jul 11, 2024
24 checks passed
@hecrj hecrj deleted the scrollable-alignment-helpers branch July 11, 2024 02:50
@alex-ds13
Copy link
Contributor

@hecrj Wouldn't it make more sense for this functions to take an alignment::Horizontal and alignment::Vertical like the ones from the container widget? To keep it consistent?

@hecrj
Copy link
Member Author

hecrj commented Jul 12, 2024

@alex-ds13 That wouldn't work because those enums have 3 variants, while scrollable::Alignment has only 2.

@alex-ds13
Copy link
Contributor

@alex-ds13 That wouldn't work because those enums have 3 variants, while scrollable::Alignment has only 2.

Oh I didn't notice this Alignment was specific for the scrollable... I thought it was the global Alignment.

Couldn't you use the version with 3 variants anyway and simply ignore the variant that doesn't make sense? It's just that this many different Alignments can become confusing...

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
addition feature New feature or request widget
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants