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

Tweak minsize of editor ColorPickerButtons #61133

Merged
merged 1 commit into from
May 19, 2022

Conversation

KoBeWi
Copy link
Member

@KoBeWi KoBeWi commented May 17, 2022

Follow-up to #60867
I set the size to twice the default font size and it looks the same as before:
image
On bigger editor font sizes the buttons automatically adjust, on smaller sizes they are bigger than text.

@KoBeWi KoBeWi added this to the 4.0 milestone May 17, 2022
@KoBeWi KoBeWi requested a review from a team as a code owner May 17, 2022 20:47
Copy link
Contributor

@fire-forge fire-forge left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

It needs to take editor scale (EDSCALE) into account. To do that, it might be better to store ColorPickerButton min size in the editor theme. It can be stored as a theme constant, and usages of EditorNode::COLOR_PICKER_BUTTON_SIZE can be replaced with Size2(0, get_theme_constant(SNAME("color_picker_button_height"), SNAME("Editor"))

@KoBeWi
Copy link
Member Author

KoBeWi commented May 19, 2022

Changed to theme constant.

@akien-mga akien-mga merged commit 920ca62 into godotengine:master May 19, 2022
@akien-mga
Copy link
Member

Thanks!

@KoBeWi KoBeWi deleted the polor_kicker branch May 19, 2022 15:59
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