godot icon indicating copy to clipboard operation
godot copied to clipboard

Fix `Button` minimum size when `disabled` is toggled.

Open WhalesState opened this issue 1 year ago • 3 comments

  • Fixes: https://github.com/godotengine/godot/issues/95580

WhalesState avatar Oct 06 '24 17:10 WhalesState

Updating minimum size in NOTIFICATION_DRAW means that the Button's size is undefined until it's drawn for the first time. This can cause various sizing problems with containers.

KoBeWi avatar Oct 06 '24 17:10 KoBeWi

Updating minimum size in NOTIFICATION_DRAW means that the Button's size is undefined until it's drawn for the first time. This can cause various sizing problems with containers.

We can use _shape() inside get_minimum_size() similar to how Label do, but I couldn't find any issues in editor since everything was fine after this change.

The reason why i have done this is because I have compared both Label and Button to check what happens when the font_oversampling changes, and the Label is taking care of everything inside the draw notification.

WhalesState avatar Oct 06 '24 17:10 WhalesState

I just have fixed the minimum size when disabled is toggled, since you already have fixed the other issues.

WhalesState avatar Oct 07 '24 15:10 WhalesState

Why was this closed?

KoBeWi avatar Oct 25 '24 12:10 KoBeWi

It seems they moved to a different fork project of Godot and closed all of their PRs, so I assume they're up for grabs for anyone who wants to reopen them as a new PR.

markdibarry avatar Oct 25 '24 12:10 markdibarry

Except not all were closed https://github.com/godotengine/godot/pulls/whalesstate 🤔

Some of the closed PRs were already approved and did not require further action. You can still restore the branch and reopen them.

KoBeWi avatar Oct 25 '24 12:10 KoBeWi

Thanks!

Repiteo avatar Nov 11 '24 20:11 Repiteo