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

Provide theme properties to limit icon size for Button. #71872

Conversation

Daylily-Zeleen
Copy link
Contributor

I think a way to limite the icon size of Button is necessary.

This pr relevant to #71818 , to handle the icon size of EditorResourcePicker.

icon.size.mp4

@YuriSizov
Copy link
Contributor

To achieve the results from the linked PR we don't actually need to make any additions. So this is PR is not required now, at least not to support that feature. See #75472.

We can revisit the idea, if it's useful for something else.

@Daylily-Zeleen
Copy link
Contributor Author

To achieve the results from the linked PR we don't actually need to make any additions. So this is PR is not required now, at least not to support that feature. See #75472.

We can revisit the idea, if it's useful for something else.

I haven't followed this repositories for a while. It still have not a way to limit icon size for buttons, right?

If yes, I think this pr is still necessary, we can use the same texture to make buttons which have different size of icons, instead of creating textures for every size of button, and beneficial to tune the size of icon in editor.

By the way, to let them as theme properties is useful to create persets for different size buttons.

@YuriSizov
Copy link
Contributor

There is no way to limit icons to a specific size, no, but buttons have an Expand icon flag that allows it to scale to the button size.

So that other PR never needed this functionality. If there is some use for it beyond that, please make a formal proposal with your use case.

@YuriSizov
Copy link
Contributor

After additional testing it seems we might still need a way to limit the icon to a specific size. I'll add one to #75472, but only for the width, so it works the same way it does for Tree and PopupMenu. The height is scaled with the respect to the ratio.

If this is sufficient for your use case, then there is no need to open a proposal.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants