godot icon indicating copy to clipboard operation
godot copied to clipboard

Implement dynamic scaling of the LineEdit right icon based on control size and scale factor

Open nongvantinh opened this issue 1 year ago • 2 comments

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

The implementation allows the LineEdit node to scale the right icon to match the font size first. Then, when the expand_icon option is enabled, the icon will expand to the full height of the node. The scale of the icon can then be controlled using the scale factor.

https://github.com/user-attachments/assets/bed11cde-9424-4f0f-9d6a-d7145eb40dda

nongvantinh avatar Aug 19 '24 19:08 nongvantinh

Right Icon Scale has no effect when Expand Icon is off. It should be disabled in that case.

KoBeWi avatar Nov 20 '24 13:11 KoBeWi

This changes the default behavior of the right icon. It will scale to text, while previously it would use original size. I think the behavior should be preserved. You can change expand_icon to expand_mode enum and allow all 3 behaviors (original size, fit to text and fit to LineEdit).

KoBeWi avatar Nov 20 '24 13:11 KoBeWi

Needs rebase

Repiteo avatar Nov 14 '25 02:11 Repiteo

This PR is older than my entire volatile memory.

nongvantinh avatar Nov 22 '25 13:11 nongvantinh

Thanks!

Repiteo avatar Nov 24 '25 16:11 Repiteo