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

Allow easier setting of background color for TextEdit #5203

Merged
merged 4 commits into from
Oct 2, 2024

Conversation

bircni
Copy link
Contributor

@bircni bircni commented Oct 1, 2024

Copy link

github-actions bot commented Oct 1, 2024

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

@bircni bircni marked this pull request as ready for review October 1, 2024 17:13
@lucasmerlin lucasmerlin added feature New feature or request egui style visuals and theming labels Oct 1, 2024
@lucasmerlin
Copy link
Collaborator

Is there a reason why one would often need to change the background color of TextEdits?
Someone could argue that if we have this functionality for the background, we should also add functions to customize the font, size, padding, etc... I think this could get out of hand quickly.
If something like this is desirable be useful I think we should come up with some way to generalize this and add this to all widgets (and I think then this is related to #3284)

@AlexanderSchuetz97
Copy link

AlexanderSchuetz97 commented Oct 1, 2024

@lucasmerlin
I require this for 2 reasons:
Really highlight text edits in red if they contain invaluid data that the human must change.

I use gray background for every other textbox because with white background users didnt even realize the textbox exists until they moved their cursor over them.

@bircni
Thank you for implementing this.

Copy link
Collaborator

@lucasmerlin lucasmerlin left a comment

Choose a reason for hiding this comment

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

I talked with @emilk and we decided that since extreme_bg_color is kind of obscure it makes sense to add this until #3284 is implemented

crates/egui/src/widgets/text_edit/builder.rs Outdated Show resolved Hide resolved
@bircni
Copy link
Contributor Author

bircni commented Oct 2, 2024

Okay! I will also add a comment to refer to the issue you mentioned

@bircni bircni requested a review from lucasmerlin October 2, 2024 17:14
@lucasmerlin
Copy link
Collaborator

Thank you!

@lucasmerlin lucasmerlin merged commit 0f2b427 into emilk:master Oct 2, 2024
23 checks passed
@bircni bircni deleted the patch15 branch October 2, 2024 19:58
hacknus pushed a commit to hacknus/egui that referenced this pull request Oct 30, 2024
* Closes <emilk#5183>
* [x] I have followed the instructions in the PR template
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 style visuals and theming
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Allow easier setting of background color for TextEdit
3 participants