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

Button sizing broken by .NET9 when using the Mac UI Idiom #26154

Open
piersdeseilligny opened this issue Nov 27, 2024 · 3 comments
Open

Button sizing broken by .NET9 when using the Mac UI Idiom #26154

piersdeseilligny opened this issue Nov 27, 2024 · 3 comments
Labels
area-controls-button Button, ImageButton platform/macOS 🍏 macOS / Mac Catalyst potential-regression This issue described a possible regression on a currently supported version., verification pending s/needs-repro Attach a solution or code which reproduces the issue t/bug Something isn't working

Comments

@piersdeseilligny
Copy link

Description

It seems like the sizing/layout of buttons has been broken by .NET 9 in Mac Catalyst, when using the Mac UI Idiom.

.NET 8 (correct):
Image

.NET 9 (incorrect):
Image

Adding padding does not fix the issue, as it ends up being inconsistent depending on the length of the text. For example, both of these buttons have Padding="0,25", but now have inconsistent padding.

Image

Steps to Reproduce

Any buttons without an explicitly set size seem to have this issue:

        <HorizontalStackLayout VerticalOptions="Center" HorizontalOptions="End" Spacing="10" Padding="20" >
            <Button Text="Cancel" Clicked="UIAction_Cancel_Clicked"/>
            <Button Text="Save" Clicked="UIAction_Save_Clicked"/>
        </HorizontalStackLayout>

Link to public reproduction project repository

No response

Version with bug

9.0.10 SR1

Is this a regression from previous behavior?

Yes, this used to work in .NET MAUI

Last version that worked well

Unknown/Other

Affected platforms

macOS

Affected platform versions

MacOS 15.1.1 (at least)

Did you find any workaround?

No response

Relevant log output

@piersdeseilligny piersdeseilligny added the t/bug Something isn't working label Nov 27, 2024
Copy link

We've found some similar issues:

If any of the above are duplicates, please consider closing this issue out and adding additional context in the original issue.

Note: You can give me feedback by 👍 or 👎 this comment.

@jfversluis jfversluis added platform/macOS 🍏 macOS / Mac Catalyst area-controls-button Button, ImageButton potential-regression This issue described a possible regression on a currently supported version., verification pending labels Nov 27, 2024
@tj-devel709
Copy link
Member

@piersdeseilligny Thanks for the issue, could you share how you are using the Mac Idiom with a reproduction? I am not seeing this behavior on my end. I do believe there are some known weird behavior with the mac idioms though.

@tj-devel709 tj-devel709 added the s/needs-repro Attach a solution or code which reproduces the issue label Nov 27, 2024
Copy link
Contributor

Hi @piersdeseilligny. We have added the "s/needs-repro" label to this issue, which indicates that we require steps and sample code to reproduce the issue before we can take further action. Please try to create a minimal sample project/solution or code samples which reproduce the issue, ideally as a GitHub repo that we can clone. See more details about creating repros here: https://github.com/dotnet/maui/blob/main/.github/repro.md

This issue will be closed automatically in 7 days if we do not hear back from you by then - please feel free to re-open it if you come back to this issue after that time.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
area-controls-button Button, ImageButton platform/macOS 🍏 macOS / Mac Catalyst potential-regression This issue described a possible regression on a currently supported version., verification pending s/needs-repro Attach a solution or code which reproduces the issue t/bug Something isn't working
Projects
None yet
Development

No branches or pull requests

3 participants