re_viewer welcome screen code cleanup#8784
Closed
brody2consult wants to merge 4 commits intorerun-io:mainfrom
Closed
re_viewer welcome screen code cleanup#8784brody2consult wants to merge 4 commits intorerun-io:mainfrom
brody2consult wants to merge 4 commits intorerun-io:mainfrom
Conversation
emilk
reviewed
Jan 24, 2025
182ec42 to
70c60ce
Compare
brody2consult
commented
Jan 24, 2025
…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
brody2consult
commented
Jan 24, 2025
Comment on lines
+14
to
+21
| 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"), | ||
| } | ||
| }; | ||
| } |
Contributor
Author
There was a problem hiding this comment.
I think this should be defined in ecolor, I should be able to propose this over the weekend.
Member
There was a problem hiding this comment.
There already is an ecolor::hex_color! macro: https://docs.rs/ecolor/latest/ecolor/macro.hex_color.html
Comment on lines
+48
to
+49
| # XXX TODO FIX THIS IMPORT: | ||
| color-hex = { version = "*", default-features = false } |
Contributor
Author
There was a problem hiding this comment.
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.
Member
|
Closed by #8745 |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
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_viewercode. From a quick look through this module gives me a serious doubt:crates/viewer/re_viewer/src/ui/memory_panel.rsI 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.