Skip to content

Commit 03db295

Browse files
authored
Improve spacing and alignment of menus (#5680)
### What Based on: * emilk/egui#4232 * emilk/egui#4230 * emilk/egui#4233 ## Before <img width="402" alt="Screenshot 2024-03-26 at 11 17 57" src="https://github.com/rerun-io/rerun/assets/1148717/3a5f8d1d-ecff-49fe-8d7e-2a8a85289526"> <img width="581" alt="Screenshot 2024-03-26 at 11 17 40" src="https://github.com/rerun-io/rerun/assets/1148717/fad07dd5-076a-4bf0-a8cd-dcb1369eddf8"> ## After <img width="599" alt="Screenshot 2024-03-26 at 11 20 36" src="https://github.com/rerun-io/rerun/assets/1148717/dc4cc6d4-a117-4b6b-81b3-3fff6f64f247"> <img width="421" alt="Screenshot 2024-03-26 at 11 20 43" src="https://github.com/rerun-io/rerun/assets/1148717/857b4767-17cd-4c23-8e28-4bd03881faed"> ### Checklist * [x] I have read and agree to [Contributor Guide](https://github.com/rerun-io/rerun/blob/main/CONTRIBUTING.md) and the [Code of Conduct](https://github.com/rerun-io/rerun/blob/main/CODE_OF_CONDUCT.md) * [x] I've included a screenshot or gif (if applicable) * [x] I have tested the web demo (if applicable): * Using newly built examples: [app.rerun.io](https://app.rerun.io/pr/5680/index.html) * Using examples from latest `main` build: [app.rerun.io](https://app.rerun.io/pr/5680/index.html?manifest_url=https://app.rerun.io/version/main/examples_manifest.json) * Using full set of examples from `nightly` build: [app.rerun.io](https://app.rerun.io/pr/5680/index.html?manifest_url=https://app.rerun.io/version/nightly/examples_manifest.json) * [x] The PR title and labels are set such as to maximize their usefulness for the next release's CHANGELOG * [x] If applicable, add a new check to the [release checklist](https://github.com/rerun-io/rerun/blob/main/tests/python/release_checklist)! - [PR Build Summary](https://build.rerun.io/pr/5680) - [Docs preview](https://rerun.io/preview/003d45654e7ddf9335aa82d9c50d67dd5a0695c6/docs) <!--DOCS-PREVIEW--> - [Examples preview](https://rerun.io/preview/003d45654e7ddf9335aa82d9c50d67dd5a0695c6/examples) <!--EXAMPLES-PREVIEW--> - [Recent benchmark results](https://build.rerun.io/graphs/crates.html) - [Wasm size tracking](https://build.rerun.io/graphs/sizes.html)
1 parent 1f67220 commit 03db295

File tree

3 files changed

+18
-17
lines changed

3 files changed

+18
-17
lines changed

Cargo.lock

+10-10
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

Cargo.toml

+7-7
Original file line numberDiff line numberDiff line change
@@ -284,13 +284,13 @@ debug = true
284284
# As a last resport, patch with a commit to our own repository.
285285
# ALWAYS document what PR the commit hash is part of, or when it was merged into the upstream trunk.
286286

287-
ecolor = { git = "https://github.com/emilk/egui.git", rev = "20b0637d42892b87fb8411b39c5c256fd32d7ee3" } # egui master 2024-03-22
288-
eframe = { git = "https://github.com/emilk/egui.git", rev = "20b0637d42892b87fb8411b39c5c256fd32d7ee3" } # egui master 2024-03-22
289-
egui = { git = "https://github.com/emilk/egui.git", rev = "20b0637d42892b87fb8411b39c5c256fd32d7ee3" } # egui master 2024-03-22
290-
egui_extras = { git = "https://github.com/emilk/egui.git", rev = "20b0637d42892b87fb8411b39c5c256fd32d7ee3" } # egui master 2024-03-22
291-
egui_plot = { git = "https://github.com/emilk/egui.git", rev = "20b0637d42892b87fb8411b39c5c256fd32d7ee3" } # egui master 2024-03-22
292-
egui-wgpu = { git = "https://github.com/emilk/egui.git", rev = "20b0637d42892b87fb8411b39c5c256fd32d7ee3" } # egui master 2024-03-22
293-
emath = { git = "https://github.com/emilk/egui.git", rev = "20b0637d42892b87fb8411b39c5c256fd32d7ee3" } # egui master 2024-03-22
287+
ecolor = { git = "https://github.com/emilk/egui.git", rev = "8a10f81ca01b2ba4e0bd6e08d02fdd2063f1ddcc" } # egui master 2024-03-26
288+
eframe = { git = "https://github.com/emilk/egui.git", rev = "8a10f81ca01b2ba4e0bd6e08d02fdd2063f1ddcc" } # egui master 2024-03-26
289+
egui = { git = "https://github.com/emilk/egui.git", rev = "8a10f81ca01b2ba4e0bd6e08d02fdd2063f1ddcc" } # egui master 2024-03-26
290+
egui_extras = { git = "https://github.com/emilk/egui.git", rev = "8a10f81ca01b2ba4e0bd6e08d02fdd2063f1ddcc" } # egui master 2024-03-26
291+
egui_plot = { git = "https://github.com/emilk/egui.git", rev = "8a10f81ca01b2ba4e0bd6e08d02fdd2063f1ddcc" } # egui master 2024-03-26
292+
egui-wgpu = { git = "https://github.com/emilk/egui.git", rev = "8a10f81ca01b2ba4e0bd6e08d02fdd2063f1ddcc" } # egui master 2024-03-26
293+
emath = { git = "https://github.com/emilk/egui.git", rev = "8a10f81ca01b2ba4e0bd6e08d02fdd2063f1ddcc" } # egui master 2024-03-26
294294

295295
# Useful while developing:
296296
# ecolor = { path = "../../egui/crates/ecolor" }

crates/re_ui/src/design_tokens.rs

+1
Original file line numberDiff line numberDiff line change
@@ -173,6 +173,7 @@ fn apply_design_tokens(ctx: &egui::Context) -> DesignTokens {
173173

174174
egui_style.spacing.item_spacing = egui::vec2(8.0, 8.0);
175175
egui_style.spacing.menu_margin = crate::ReUi::view_padding().into();
176+
egui_style.spacing.menu_spacing = 1.0;
176177

177178
// avoid some visual glitches with the default non-zero value
178179
egui_style.visuals.clip_rect_margin = 0.0;

0 commit comments

Comments
 (0)