Add alignment configuration to FDialogContentStyle#1071
Open
elrizwiraswara wants to merge 1 commit into
Open
Conversation
FDialog's content alignment was hardcoded to `start` in the internal Content hierarchy, so it could not be configured via FThemeData.dialogStyle. Expose crossAxisAlignment, titleTextAlign, and bodyTextAlign on the style, all defaulting to `start` to preserve existing behavior.
Member
|
Thanks for filing a PR, unfortunately I'm putting this PR on hold as we evaluate shifting certain widget's content/layouts to being purely CLI generated instead. |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Describe the changes
First off, thank you for Forui. I've been using it for several months now and the
experience has been great.
While moving to the latest version, I noticed the dialog styling changed. Most of it can
be adjusted through
FThemeData.dialogStyle, but the content's cross-axis (vertical)alignment cannot. The earlier changelog notes this change:
I personally prefer the previous centered content alignment. Right now the only way to get
it back is a custom
FDialog.raw, which is awkward to apply consistently across an entireapp. Being able to set it once on
FThemeData.dialogStylewould be much simpler, so this PRadds that:
FDialogContentStyle.crossAxisAlignmentto control how the image, title, body, andactions align along the cross axis.
FDialogContentStyle.titleTextAlignandFDialogContentStyle.bodyTextAlignto controlthe title/body text alignment.
start, so existing behavior is unchanged (non-breaking).Contentnow reads these from the style instead of hardcoding them. Because the fields arekeyed by the dialog's axis variant, horizontal and vertical layouts can be aligned
independently.
Checklist