Closed Sensei6x9 closed 1 year ago
Reproducing in VS2022 / net6 using the latest package
Without any icon it looks properly aligned
Setting an icon
Now setting alignment properties ImageBeforeText
TextBeforeImage
Now I checked with a standard button (screenshotted the icon, and loaded it to the button). Spoiler: Exact the same behaviour
Closing this as "won't fix" if it's ok for you @Sensei6x9
Sorry @mkoertgen, forgot to visit this issue. Yeah, it's okay, I see now that there is a somewhat minimum button height needed to make it look at least like it's properly aligned.
As always, thank you for a prompt reply.
Hi, I'm visiting this issue now, as I'm having the same problems with vertical alignment. The icon is significantly closer to the top of the IconButton, even with a small icon compared to a large container.
Here is an example, icon size 48 in a button size 100x100 with no padding (screenshotted then measured in Paint3D to show difference):
I'm also confused by your reply of "the standard Button has the same behavior" @mkoertgen - in the screenshots you posted, the standard Button seems to be vertically centering the icon correctly (text is between the two horizontal lines of the icon), whereas the IconButton is clearly shifted upwards (text now aligns with the bottom horizontal line of the icon)
Hi @emccourt ,
Hm, not sure if I recall correctly. But, yes, now that you are bringing it up again, I see that there is a clear vertical alignment shift between the Button and IconButton screenshots.
Feel free to reopen the issue. Not sure whether I can help much with remediation in the near future.
Describe the bug In VB.Net WinForms; Button content is not properly aligned in middle. The icon is leaning towards the top even when alignment is set to center.
To Reproduce Set the button's property to this