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: MaterialOutlinedTextBoxStyle layout #1494

Open
wants to merge 2 commits into
base: master
Choose a base branch
from

Conversation

Xiaoy312
Copy link
Contributor

GitHub Issue:
fix #1469 (comment)
partially fixed #1487 for Outlined style

PR Type

What kind of change does this PR introduce?

  • Bugfix

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:

@Xiaoy312 Xiaoy312 changed the title chore: fix a TreeGraph crash fix: MaterialOutlinedTextBoxStyle layout Oct 25, 2024
Copy link

Azure Static Web Apps: Your stage site is ready! Visit it here: https://salmon-rock-0cfebe70f-1494.eastus2.azurestaticapps.net

Comment on lines +294 to +297
//if (fe.TransformToVisual(Window.Current.Content).TransformPoint(default) is var absPos)
//{
// yield return $"AbsPos={absPos.X},{absPos.Y}";
//}
Copy link
Contributor

@agneszitte agneszitte Oct 25, 2024

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 ?

Copy link
Contributor Author

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

Comment on lines +840 to +846
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.
Copy link
Contributor

Choose a reason for hiding this comment

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

Suggested change
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.

doc/styles/TextBox.md Show resolved Hide resolved
@agneszitte
Copy link
Contributor

@Xiaoy312 I think this PR also fixes https://github.com/unoplatform/uno.chefs/issues/710 for WASM no ?

@Xiaoy312
Copy link
Contributor Author

Xiaoy312 commented Oct 25, 2024

@Xiaoy312 I think this PR also fixes unoplatform/uno.chefs#710 for WASM no ?

no this doesnt fix passwordbox, we didnt touch that file, but the problem is of same nature

@agneszitte
Copy link
Contributor

agneszitte commented Oct 25, 2024

@Xiaoy312 I think this PR also fixes unoplatform/uno.chefs#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
I will let you quickly double check details left in regards to studio please

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
2 participants