-
Notifications
You must be signed in to change notification settings - Fork 388
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
re_viewer welcome screen code cleanup #8784
base: main
Are you sure you want to change the base?
re_viewer welcome screen code cleanup #8784
Conversation
crates/viewer/re_viewer/src/ui/welcome_screen/welcome_section.rs
Outdated
Show resolved
Hide resolved
182ec42
to
70c60ce
Compare
crates/viewer/re_viewer/src/ui/welcome_screen/welcome_section.rs
Outdated
Show resolved
Hide resolved
…S NOT COMPILE as hex_color macro offers RGBA option that requires non-const Color32::from_rgba_unmultiplied fn
…RO TO UTILITY MODULE OR UTILITY CRATE
macro_rules! color_from_rgb_hex { | ||
($hex:literal) => { | ||
match color_hex::color_from_hex!($hex).as_slice() { | ||
[a, b, c] => Color32::from_rgb(*a, *b, *c), | ||
_ => panic!("XXX"), | ||
} | ||
}; | ||
} |
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.
I think this should be defined in ecolor
, I should be able to propose this over the weekend.
# XXX TODO FIX THIS IMPORT: | ||
color-hex = { version = "*", default-features = false } |
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.
I would like to remove this in favor of defining the needed macro in ecolor
. As I said in the other comment, I should be able to do this over the weekend.
Related
What
refactoring to extract welcome doc button text & color into constants
probably should have been part of PR #8745 - I didn't want to slow it down any further
OPEN QUESTION:
I considered proposing this kind of cleanup throughout the
re_viewer
code. From a quick look through this module gives me a serious doubt:crates/viewer/re_viewer/src/ui/memory_panel.rs
I would love to find a way to make a more data-driven approach for functions like
MemoryPanel::gpu_stats
&MemoryPanel::caches_stats
.Maybe best to close & reject this one for now.