-
Notifications
You must be signed in to change notification settings - Fork 3.8k
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
Multi-line Button text not centered for the 2nd line #21696
Comments
PrjApc - 2023-09-09.zip Thank you for your help with this! Mono is an awesome software package. I hope it will remain available and supported for quite some time for Ubuntu and Yocto! Though source code is not greatly required for this issue, the main source code is: using System; namespace Apc
} |
Im not a mono developer but as far as I can see, this bug falls to libgdiplus to function GDIPlus.GdipDrawString |
Hello!
As per my comment on:
#21697
I believe the Japanese character issue has been solved, but I don’t believe it got into the released code. If not part of a release, can I get it into the next release? See the github solution: mono/libgdiplus#628
***@***.***
Seems like isspace() should not be used anywhere in the Mono code or in cases similar to this case.
The change that was made seems like it would fix the problem. As I see the problem, it does seem like it’s interpreting certain Japanese (wide) characters as spaces and trims them off the end of the string. If the string is measured in pixels, the string length is reduced by this character, which is why the truncated Japanese string is centered in the button.
From: dr3loy ***@***.***>
Sent: Thursday, October 5, 2023 10:16 AM
To: mono/mono ***@***.***>
Cc: Kris Kazmar ***@***.***>; Author ***@***.***>
Subject: Re: [mono/mono] Multi-line Button text not centered for the 2nd line (Issue #21696)
I mean https://github.com/mono/libgdiplus#optional-build-options
—
Reply to this email directly, view it on GitHub<#21696 (comment)>, or unsubscribe<https://github.com/notifications/unsubscribe-auth/ALHXYKREDLT7ICFLW2JN4UDX526LVAVCNFSM6AAAAAA3S2FDNWVHI2DSMVQWIX3LMV43OSLTON2WKQ3PNVWWK3TUHMYTONBYHE4TKNZRG4>.
You are receiving this because you authored the thread.Message ID: ***@***.***>
|
The issue "Multi-line Button text not centered for the 2nd line" is fixed by: |
I have a cross-platform (Windows and Linux) WinForms application. For buttons where the button text wraps to a second line, the first line is always centered, but the second line is not. It works fine natively on Windows, but on Linux using Mono, it does not. Is there a fix for this? I've tried "MyButton.TextAlign = System.Drawing.ContentAlignment.MiddleCenter;"
The text was updated successfully, but these errors were encountered: