leocb / MaterialSkin

Theming .NET WinForms, C# or VB.Net, to Google's Material Design Principles.
MIT License
437 stars 132 forks source link

MaterialButton Icon position issue when AutoSize is false #296

Closed valimaties closed 2 years ago

valimaties commented 2 years ago

Hi. There's an issue with position of Icon on MaterialButton, when AutoSize = false and the Height of MaterialButton is greater than default.

Demo: ButtonIconPositionAndOverlayIssue

orapps44 commented 2 years ago

You're not supposed to modify material button height. I would suggest to keep AutoSize = true to keep compliancy with material design specification.

valimaties commented 2 years ago

I thought MaterialSkin is based on Material Design, but not necessary use all the restrictions of Material Design. In some circumstances, when there is a lot of text but the width of button's parent container does not allow a long button, to let Material Skin choose the width of my button, I must wrap text inside button. Which means that the height of this button it must be other than restricted one by Material Design specification. And they don't restrict, they only suggest not to wrap! If the user don't have the "freedom of choice", in most of the cases they will search for another "skin" pack. Yes, I agree that "default" use/layout of a control must be Material Design's implementation and suggests. But MaterialSkin could do other thing over the based implementation (I think...)

Edit : If AutoSize must be true all the time, this means it must be hidden for user, and implemented a new bool AutoSize property, which will always override this property to true and protect the setter to restrict property modification.