egui icon indicating copy to clipboard operation
egui copied to clipboard

TextEdit hint text styling

Open zaaarf opened this issue 1 year ago • 0 comments

Simply adds a hint_text_font (any suggestions for a better name? hint_text_style seemed misleading as it doesn't only accept TextStyle) method to the TextEdit builder that allows to set the styling (specifically, a FontSelection) for the hint text.

My personal use-case for this was having body-sized hint text in a heading-sized TextEdit, but I'm sure there's more out there.

The PR shouldn't break compatibility, as it's stored as an Option that defaults to the font_id (which was the only behaviour prior to this) when empty.

It looked too trivial to add something to the actual demo, but I have it locally, so let me know if I should commit that.

Ran the check script locally, had no complaints.

zaaarf avatar May 21 '24 12:05 zaaarf