Skip to content
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

Merged
merged 22 commits into from
Dec 9, 2022
Merged

Conversation

emilk
Copy link
Member

@emilk emilk commented Dec 7, 2022

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

Screen Shot 2022-12-07 at 21 52 17

Screen Shot 2022-12-07 at 21 52 39

Checklist

  • I have read and agree to Contributor Guide and the Code of Conduct
  • I've included a screenshot or gif (if applicable)
  • I've added a line to CHANGELOG.md (if this is a big enough change to warrant it)

@emilk emilk force-pushed the emilk/visual-tweaks branch from 4afbef0 to 2b76c54 Compare December 7, 2022 17:54
@nikolausWest
Copy link
Member

Fixes #492

@emilk emilk changed the title UI improvements: Follow the style guideline UI improvements: Start follow the style guideline Dec 8, 2022
@emilk emilk marked this pull request as ready for review December 8, 2022 09:57
@Wumpf Wumpf self-requested a review December 8, 2022 10:38
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 {
Copy link
Member

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
Copy link
Member

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

Copy link
Member

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

Copy link
Member Author

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())
Copy link
Member

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 🤔

Copy link
Member

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?

Copy link
Member Author

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

Copy link
Member Author

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

@emilk emilk merged commit 6d7a488 into main Dec 9, 2022
@emilk emilk deleted the emilk/visual-tweaks branch December 9, 2022 07:34
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants