Crate egui
Chester Wyke September 05, 2024 Updated: September 03, 2025 #RustConditional Compilation
Install
Crate Serde
References
Cargo
Toolchain (Nightly)
String Formatting
Time
Crate Tokio
Publish Crate
rustfmt
Single file script
Snippets
CI
Pattern Type State
WASM
Create New Crate
Documentation
JSON
Pattern Builder
Testing
Working with collections of bytes
Thoughts about rust
Are we yet
OnceLock
Crate Actix Web
Stack Overflow
Crate Clap
Crate Poll Promise
Crate Insta
Tips
Create new egui project
Crate CSV
Crate egui
Iterators
Crate Tracing Subscriber
Regex
vscode
Enum Conversion
Macros
lettre
Google APIs
Get window size
Source: https://github.com/emilk/egui/discussions/2015
ctx.input;
Prevent a UI from shrinking if the contents get smaller
Source: https://github.com/emilk/egui/discussions/465
The example below checks for changes in hight but width should be similar. Without the if statement it causes the widget to grow if the contents get bigger.
if ui.available_height > 0.0
Accommodate dark monitors
See back story
I use the screen a lot and don’t like my main screen very bright or very high contrast. One might even say I’ve set it too low. Unfortunately, that means that the default dark theme for egui is extremely low contrast on my screen and thus I need to change from the defaults. I keep forgetting what I have to change so I’m going to make notes here to make it easier for next time.
Using the built in settings page (needs to exposed by application, like it is on https://egui.rs in the Backend window).
Style
-> Visuals
-> Background colors
Windows = 64,64,64
Panels = 60,60,60