-
Notifications
You must be signed in to change notification settings - Fork 1.6k
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
Follow the system theme in egui #4860
Conversation
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Code looks very good; I'll test once the winit 0.30 changes has been merged in
Looks like some doc comments are still missing: warning: missing documentation for a method
--> crates/egui/src/memory/theme.rs:13:5
|
13 | pub fn default_visuals(self) -> crate::Visuals {
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
|
note: the lint level is defined here
--> crates/egui/src/memory.rs:1:9
|
1 | #![warn(missing_docs)] // Let's keep this file well-documented.` to memory.rs
| ^^^^^^^^^^^^
warning: missing documentation for an associated function
--> crates/egui/src/memory/theme.rs:20:5
|
20 | pub fn from_dark_mode(dark_mode: bool) -> Self {
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
warning: `egui` (lib) generated 2 warnings |
Ah yes, I committed the review suggestions without thinking about this 😅 I'll fix it when I rebase :) |
Co-authored-by: Emil Ernerfeldt <emil.ernerfeldt@gmail.com>
d17ccc8
to
e986ae4
Compare
winit 0.30 changes are merged in 🎉 |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Very nice, works great!
This PR just moves
Theme
and the "follow system theme" settings to egui and addsRawInput.system_theme
.A follow-up PR can then introduce the two separate
dark_mode_style
andlight_mode_style
fields onOptions
.Breaking changes
The options
follow_system_theme
anddefault_theme
has been moved fromeframe
intoegui::Options
, settable withctx.options_mut