-
Notifications
You must be signed in to change notification settings - Fork 412
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
UI improvements: Start follow the style guideline #479
Conversation
4afbef0
to
2b76c54
Compare
Fixes #492 |
invert_width: false, | ||
invert_height: false, | ||
} | ||
} | ||
|
||
/// Protect against old serialized data that is not up-to-date with the new tensor | ||
pub fn is_valid(&self, num_dim: usize) -> bool { |
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 came here for a ui style PR :P
@@ -64,23 +64,54 @@ impl ReUi { | |||
} | |||
} | |||
|
|||
/// Add stripes to grids and tables? | |||
pub fn striped() -> bool { | |||
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.
this is probably the wrong place to argue about styling but this does make a lot of stuff harder to read imho
ah well, modern times
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.
Yeah I'm inclined to agree with @Wumpf here
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.
Let's try it for a while and see how it goes. it's a very easy thing to revert :)
@@ -229,7 +229,7 @@ pub(crate) fn show_detailed_data_msg( | |||
let is_image = matches!(msg.data, LoggedData::Single(Data::Tensor(_))); | |||
|
|||
egui::Grid::new("fields") | |||
.striped(true) | |||
.striped(re_ui::ReUi::striped()) |
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.
with a lot of these would be nice to be able to set this as a the global default for any new grid/table so it doesn't need to be set 🤔
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.
going all the way to modify these in egui style is ofc quite involved but maybe we should instead have wrapper in re_ui, i.e. re_ui::Grid
which does the necessary settings right away plus patches the show/ui methods as required?
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 guess a egui::Visuals::striped
as a default for Table and Grid would be pretty easy though
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'll do it later
Part of #400. Updates a lot of colors, sizes, and margins.
Still a lot of low-hanging fruit left, but it's a step in the right direction.
Sibling PR: emilk/egui#2406
Checklist
CHANGELOG.md
(if this is a big enough change to warrant it)