-
Notifications
You must be signed in to change notification settings - Fork 32
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: MaterialOutlinedTextBoxStyle layout #1494
base: master
Are you sure you want to change the base?
fix: MaterialOutlinedTextBoxStyle layout #1494
Conversation
Azure Static Web Apps: Your stage site is ready! Visit it here: https://salmon-rock-0cfebe70f-1494.eastus2.azurestaticapps.net |
//if (fe.TransformToVisual(Window.Current.Content).TransformPoint(default) is var absPos) | ||
//{ | ||
// yield return $"AbsPos={absPos.X},{absPos.Y}"; | ||
//} |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I this normal to stay commented on here @Xiaoy312 ?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
yeah
we still need it, but it is not working now
but i dont want to spent time fixing it now
We need to center this in both Singleline and Multiline mode: | ||
- SingleLine via Border.MinHeight + SV.HAlign | ||
- Multiline via Border.Padding | ||
The reason we are using an uneven Border.Padding is because the actual platform-specific text input element | ||
have different height on each platform (win=21, skia=20). The 10-top guarantee that the 1st line | ||
in multiline mode remains the same as in singleline. The 8-bottom leaves room for growth if needed, | ||
so we don't grow pass the MaterialOutlinedTextBoxMinHeight of 56. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
We need to center this in both Singleline and Multiline mode: | |
- SingleLine via Border.MinHeight + SV.HAlign | |
- Multiline via Border.Padding | |
The reason we are using an uneven Border.Padding is because the actual platform-specific text input element | |
have different height on each platform (win=21, skia=20). The 10-top guarantee that the 1st line | |
in multiline mode remains the same as in singleline. The 8-bottom leaves room for growth if needed, | |
so we don't grow pass the MaterialOutlinedTextBoxMinHeight of 56. | |
We need to center this in both Singleline and Multiline mode: | |
- SingleLine via Border.MinHeight + SV.HAlign | |
- Multiline via Border.Padding | |
The reason we are using an uneven Border.Padding is because the actual platform-specific text input element | |
have different heights on each platform (win=21, skia=20). The 10-top guarantee that the 1st line | |
in multiline mode remains the same as in singleline. The 8-bottom leaves room for growth if needed, | |
so we don't grow past the MaterialOutlinedTextBoxMinHeight of 56. |
@Xiaoy312 I think this PR also fixes https://github.com/unoplatform/uno.chefs/issues/710 for WASM no ? |
no this doesnt fix passwordbox, we didnt touch that file, but the problem is of same nature |
Oh yeah sorry, Password is separated. But it was related to TextBox also @Xiaoy312 if I am not mistaken, see https://github.com/unoplatform/uno.studio/issues/537#issuecomment-2102665064 |
GitHub Issue:
fix #1469 (comment)
partially fixed #1487 for Outlined style
PR Type
What kind of change does this PR introduce?
Description
adjust MaterialOutlinedTextBoxStyle template to respect MinHeight
fix MaterialOutlinedTextBoxStyle header position in multiline mode
PR Checklist
Please check if your PR fulfills the following requirements: