godot icon indicating copy to clipboard operation
godot copied to clipboard

Allow changing the color for the Checkbox's checked and unchecked icons

Open nongvantinh opened this issue 1 year ago • 4 comments

Close: https://github.com/godotengine/godot-proposals/issues/10492

Occasionally, the default white color for the icon does not meet our needs, and we would like to change it. However, the CheckBox does not currently have a mechanism to modify this color.

https://github.com/user-attachments/assets/04a5451a-2d46-43d4-af33-ca7dc53c5162

nongvantinh avatar Aug 18 '24 07:08 nongvantinh

You can just recolor the icon, there is no reason to add a new property. Compare with Button, which has icon colors for different button states (hover, pressed, disabled etc.). Adding a single color does not make sense if you can achieve the same effect by changing the icon.

KoBeWi avatar Aug 18 '24 10:08 KoBeWi

Are you saying that if I want 10 different colors for the same image (for theming), I would need to create 10 identical icons, each with a different color -> increase exported size?

The assets I buy from another store are created by the seller without knowing how I will use them. As a result, they are all created at the same size of 512x512, some are 256x256. The engine can handle scaling, but it won’t implement scaling for the LineEdit node because it can always be adjusted using another image manipulation editor?

image

What I’m saying is that while it is a rare use case, that doesn’t mean it is redundant or useless. Adding it will obviously require maintaining more code, but it introduces a flexible design and adaptability to the engine.

nongvantinh avatar Aug 18 '24 15:08 nongvantinh

Technically you can create the colored icons dynamically from the base icon. The storage space will be the same, but it will use more memory.

KoBeWi avatar Aug 19 '24 07:08 KoBeWi

I could've sworn I've seen similar cases of "modulate existing along with the texture" for Theme Properties, so it doesn't feel entirely unjustified.

Mickeon avatar Aug 19 '24 09:08 Mickeon

Thanks!

Repiteo avatar Mar 10 '25 15:03 Repiteo