Skip to content

Commit

Permalink
Update to latest egui (#8865)
Browse files Browse the repository at this point in the history
## Changes
* When painting a rect stroke, you must chose if the stroke is inside,
outside, or on the rectangle.
* TextEdit and ColorButton have been shrunk to fit inside their widget
rects

## TODO
* [x] Check that the choices of `StrokeKind` makes sense everywhere
  • Loading branch information
emilk authored Jan 30, 2025
1 parent ec2adb6 commit a061683
Show file tree
Hide file tree
Showing 47 changed files with 137 additions and 109 deletions.
31 changes: 15 additions & 16 deletions Cargo.lock
Original file line number Diff line number Diff line change
Expand Up @@ -1957,7 +1957,7 @@ checksum = "0d6ef0072f8a535281e4876be788938b528e9a1d43900b82c2569af7da799125"
[[package]]
name = "ecolor"
version = "0.30.0"
source = "git+https://github.com/emilk/egui.git?branch=master#83649f2e295a4c27ea08023b6e7f591d3e60ea7f"
source = "git+https://github.com/emilk/egui.git?branch=master#8eda32ec64c7b48c7b8f9195e3abc8c10efa8f00"
dependencies = [
"bytemuck",
"color-hex",
Expand All @@ -1974,7 +1974,7 @@ checksum = "18aade80d5e09429040243ce1143ddc08a92d7a22820ac512610410a4dd5214f"
[[package]]
name = "eframe"
version = "0.30.0"
source = "git+https://github.com/emilk/egui.git?branch=master#83649f2e295a4c27ea08023b6e7f591d3e60ea7f"
source = "git+https://github.com/emilk/egui.git?branch=master#8eda32ec64c7b48c7b8f9195e3abc8c10efa8f00"
dependencies = [
"ahash",
"bytemuck",
Expand Down Expand Up @@ -2013,7 +2013,7 @@ dependencies = [
[[package]]
name = "egui"
version = "0.30.0"
source = "git+https://github.com/emilk/egui.git?branch=master#83649f2e295a4c27ea08023b6e7f591d3e60ea7f"
source = "git+https://github.com/emilk/egui.git?branch=master#8eda32ec64c7b48c7b8f9195e3abc8c10efa8f00"
dependencies = [
"accesskit",
"ahash",
Expand All @@ -2031,7 +2031,7 @@ dependencies = [
[[package]]
name = "egui-wgpu"
version = "0.30.0"
source = "git+https://github.com/emilk/egui.git?branch=master#83649f2e295a4c27ea08023b6e7f591d3e60ea7f"
source = "git+https://github.com/emilk/egui.git?branch=master#8eda32ec64c7b48c7b8f9195e3abc8c10efa8f00"
dependencies = [
"ahash",
"bytemuck",
Expand All @@ -2050,7 +2050,7 @@ dependencies = [
[[package]]
name = "egui-winit"
version = "0.30.0"
source = "git+https://github.com/emilk/egui.git?branch=master#83649f2e295a4c27ea08023b6e7f591d3e60ea7f"
source = "git+https://github.com/emilk/egui.git?branch=master#8eda32ec64c7b48c7b8f9195e3abc8c10efa8f00"
dependencies = [
"accesskit_winit",
"ahash",
Expand All @@ -2070,7 +2070,7 @@ dependencies = [
[[package]]
name = "egui_commonmark"
version = "0.19.0"
source = "git+https://github.com/rerun-io/egui_commonmark.git?branch=egui-update#d08ab5704b9cf6bd4234757c43b49e86c7f053c4"
source = "git+https://github.com/rerun-io/egui_commonmark.git?branch=egui-update#9d500ac65fea8273f8d26eb6f513dded86778389"
dependencies = [
"egui",
"egui_commonmark_backend",
Expand All @@ -2081,7 +2081,7 @@ dependencies = [
[[package]]
name = "egui_commonmark_backend"
version = "0.19.0"
source = "git+https://github.com/rerun-io/egui_commonmark.git?branch=egui-update#d08ab5704b9cf6bd4234757c43b49e86c7f053c4"
source = "git+https://github.com/rerun-io/egui_commonmark.git?branch=egui-update#9d500ac65fea8273f8d26eb6f513dded86778389"
dependencies = [
"egui",
"egui_extras",
Expand All @@ -2091,7 +2091,7 @@ dependencies = [
[[package]]
name = "egui_extras"
version = "0.30.0"
source = "git+https://github.com/emilk/egui.git?branch=master#83649f2e295a4c27ea08023b6e7f591d3e60ea7f"
source = "git+https://github.com/emilk/egui.git?branch=master#8eda32ec64c7b48c7b8f9195e3abc8c10efa8f00"
dependencies = [
"ahash",
"egui",
Expand All @@ -2108,7 +2108,7 @@ dependencies = [
[[package]]
name = "egui_glow"
version = "0.30.0"
source = "git+https://github.com/emilk/egui.git?branch=master#83649f2e295a4c27ea08023b6e7f591d3e60ea7f"
source = "git+https://github.com/emilk/egui.git?branch=master#8eda32ec64c7b48c7b8f9195e3abc8c10efa8f00"
dependencies = [
"ahash",
"bytemuck",
Expand All @@ -2125,7 +2125,7 @@ dependencies = [
[[package]]
name = "egui_kittest"
version = "0.30.0"
source = "git+https://github.com/emilk/egui.git?branch=master#83649f2e295a4c27ea08023b6e7f591d3e60ea7f"
source = "git+https://github.com/emilk/egui.git?branch=master#8eda32ec64c7b48c7b8f9195e3abc8c10efa8f00"
dependencies = [
"dify",
"eframe",
Expand All @@ -2140,7 +2140,7 @@ dependencies = [
[[package]]
name = "egui_plot"
version = "0.30.0"
source = "git+https://github.com/emilk/egui_plot.git?rev=80e2199a2e121db288fe6b0099d91c35acc75a7c#80e2199a2e121db288fe6b0099d91c35acc75a7c"
source = "git+https://github.com/emilk/egui_plot.git?branch=main#a19562ea60a13b276a1e96035c5600fb4932ce53"
dependencies = [
"ahash",
"egui",
Expand All @@ -2161,8 +2161,7 @@ dependencies = [
[[package]]
name = "egui_tiles"
version = "0.11.0"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "588dcf9028464fb4d23baf1f7805c13927fb540f2f9096f7d177b814848645a3"
source = "git+https://github.com/rerun-io/egui_tiles?branch=emilk/update-egui#4876446fd618c59571490c7a637043d569f2e531"
dependencies = [
"ahash",
"egui",
Expand Down Expand Up @@ -2196,7 +2195,7 @@ checksum = "60b1af1c220855b6ceac025d3f6ecdd2b7c4894bfe9cd9bda4fbb4bc7c0d4cf0"
[[package]]
name = "emath"
version = "0.30.0"
source = "git+https://github.com/emilk/egui.git?branch=master#83649f2e295a4c27ea08023b6e7f591d3e60ea7f"
source = "git+https://github.com/emilk/egui.git?branch=master#8eda32ec64c7b48c7b8f9195e3abc8c10efa8f00"
dependencies = [
"bytemuck",
"serde",
Expand Down Expand Up @@ -2312,7 +2311,7 @@ dependencies = [
[[package]]
name = "epaint"
version = "0.30.0"
source = "git+https://github.com/emilk/egui.git?branch=master#83649f2e295a4c27ea08023b6e7f591d3e60ea7f"
source = "git+https://github.com/emilk/egui.git?branch=master#8eda32ec64c7b48c7b8f9195e3abc8c10efa8f00"
dependencies = [
"ab_glyph",
"ahash",
Expand All @@ -2331,7 +2330,7 @@ dependencies = [
[[package]]
name = "epaint_default_fonts"
version = "0.30.0"
source = "git+https://github.com/emilk/egui.git?branch=master#83649f2e295a4c27ea08023b6e7f591d3e60ea7f"
source = "git+https://github.com/emilk/egui.git?branch=master#8eda32ec64c7b48c7b8f9195e3abc8c10efa8f00"

[[package]]
name = "equivalent"
Expand Down
4 changes: 2 additions & 2 deletions Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -590,10 +590,10 @@ emath = { git = "https://github.com/emilk/egui.git", branch = "master" }
# egui-wgpu = { path = "../../egui/crates/egui-wgpu" }
# emath = { path = "../../egui/crates/emath" }

egui_plot = { git = "https://github.com/emilk/egui_plot.git", rev = "80e2199a2e121db288fe6b0099d91c35acc75a7c" }
egui_plot = { git = "https://github.com/emilk/egui_plot.git", branch = "main" }
# egui_plot = { path = "../../egui_plot/egui_plot" }

# egui_tiles = { git = "https://github.com/rerun-io/egui_tiles", rev = "48e0ef566479000a23d8dabf84badced98f1b9a6" } # https://github.com/rerun-io/egui_tiles/pull/89 2024-11-19
egui_tiles = { git = "https://github.com/rerun-io/egui_tiles", branch = "emilk/update-egui" }
#egui_tiles = { path = "../egui_tiles" }

egui_commonmark = { git = "https://github.com/rerun-io/egui_commonmark.git", branch = "egui-update" } # https://github.com/lampsitter/egui_commonmark/pull/71
Expand Down
2 changes: 1 addition & 1 deletion crates/store/re_protos/proto/rerun/v0/remote_store.proto
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ service StorageNode {
rpc CreateCollectionIndex(CreateCollectionIndexRequest) returns (CreateCollectionIndexResponse) {}
// Collection index query response is a RecordBatch with 3 columns:
// - 'resource_id' column with the id of the resource
// - timepoint column with the values reprensenting the points in time
// - timepoint column with the values representing the points in time
// where index query matches. What time points are matched depends on the type of
// index that is queried. For example for vector search it might be timepoints where
// top-K matches are found within *each* resource in the collection. For inverted index
Expand Down
4 changes: 2 additions & 2 deletions crates/store/re_protos/src/v0/rerun.remote_store.v0.rs

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
1 change: 1 addition & 0 deletions crates/viewer/re_component_ui/src/color.rs
Original file line number Diff line number Diff line change
Expand Up @@ -35,6 +35,7 @@ fn edit_rgba32_impl(ui: &mut egui::Ui, color: &mut MaybeMutRef<'_, Rgba32>) -> e
response.rect,
1.0,
ui.visuals().widgets.noninteractive.fg_stroke,
egui::StrokeKind::Inside,
);

let [r, g, b, a] = color.to_array();
Expand Down
2 changes: 1 addition & 1 deletion crates/viewer/re_component_ui/src/marker_shape.rs
Original file line number Diff line number Diff line change
Expand Up @@ -81,7 +81,7 @@ pub(crate) fn paint_marker(
.filled(true);

let bounds = egui_plot::PlotBounds::new_symmetrical(0.5);
let transform = egui_plot::PlotTransform::new(rect, bounds, [true, true].into());
let transform = egui_plot::PlotTransform::new(rect, bounds, true);

let mut shapes = vec![];
points.shapes(ui, &transform, &mut shapes);
Expand Down
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
2 changes: 1 addition & 1 deletion crates/viewer/re_data_ui/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,7 @@ re_types = { workspace = true, features = [
"egui_plot", # Needed to draw marker shapes.
] }
re_types_core.workspace = true
re_ui.workspace = true
re_ui = { workspace = true, features = ["arrow"] }
re_video = { workspace = true, features = ["ffmpeg"] }
re_viewer_context.workspace = true

Expand Down
3 changes: 1 addition & 2 deletions crates/viewer/re_time_panel/src/time_panel.rs
Original file line number Diff line number Diff line change
Expand Up @@ -1311,11 +1311,10 @@ fn paint_range_highlight(
let visible_history_area_rect =
Rect::from_x_y_ranges(x_from..=x_to, rect.y_range()).intersect(rect);

painter.rect(
painter.rect_filled(
visible_history_area_rect,
0.0,
egui::Color32::WHITE.gamma_multiply(0.1),
egui::Stroke::NONE,
);
}
}
Expand Down
Loading

0 comments on commit a061683

Please sign in to comment.