Skip to content

Conversation

@emilk
Copy link
Owner

@emilk emilk commented Nov 7, 2025

Selected text now gets the color of visuals.selection.stroke.color. This means you can have inverted colors for selected text, like in the new test:
image

It also means the color of selected text in labels matches that of the text color of selected buttons.

@emilk emilk added feature New feature or request visuals Renderings / graphics releated egui labels Nov 7, 2025
@github-actions
Copy link

github-actions bot commented Nov 7, 2025

Preview available at https://egui-pr-preview.github.io/pr/7691-emilkchange-text-color-of-selected-text
Note that it might take a couple seconds for the update to show up after the preview_build workflow has completed.

View snapshot changes at kitdiff

@emilk emilk force-pushed the emilk/change-text-color-of-selected-text branch from 0a34ea6 to 62a76d2 Compare November 7, 2025 13:46
@emilk emilk merged commit fa4cfec into main Nov 7, 2025
46 of 47 checks passed
@emilk emilk deleted the emilk/change-text-color-of-selected-text branch November 7, 2025 14:34
emilk added a commit that referenced this pull request Dec 11, 2025
Selected text now gets the color of `visuals.selection.stroke.color`.
This means you can have inverted colors for selected text, like in the
new test:
<img width="154" height="46" alt="image"
src="https://github.com/user-attachments/assets/2666361d-d7e2-4d50-8e4d-2fcc128f1a81"
/>


It also means the color of selected text in labels matches that of the
text color of selected buttons.
@emilk emilk mentioned this pull request Dec 11, 2025
@KonaeAkira
Copy link
Contributor

In the screenshot you posted, it looks like the closing bracket part of of the smiley isn't affected by visuals.selection.stroke.color. That's unintentional, right?

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

Labels

egui feature New feature or request visuals Renderings / graphics releated

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants