Skip to content

Commit 3cc6a64

Browse files
committed
Update egui to laters master
1 parent 3a70a69 commit 3cc6a64

File tree

12 files changed

+50
-69
lines changed

12 files changed

+50
-69
lines changed

Cargo.lock

-22
Original file line numberDiff line numberDiff line change
@@ -1973,8 +1973,6 @@ checksum = "0d6ef0072f8a535281e4876be788938b528e9a1d43900b82c2569af7da799125"
19731973
[[package]]
19741974
name = "ecolor"
19751975
version = "0.31.0"
1976-
source = "registry+https://github.com/rust-lang/crates.io-index"
1977-
checksum = "878e9005799dd739e5d5d89ff7480491c12d0af571d44399bcaefa1ee172dd76"
19781976
dependencies = [
19791977
"bytemuck",
19801978
"color-hex",
@@ -1991,8 +1989,6 @@ checksum = "18aade80d5e09429040243ce1143ddc08a92d7a22820ac512610410a4dd5214f"
19911989
[[package]]
19921990
name = "eframe"
19931991
version = "0.31.0"
1994-
source = "registry+https://github.com/rust-lang/crates.io-index"
1995-
checksum = "eba4c50d905804fe9ec4e159fde06b9d38f9440228617ab64a03d7a2091ece63"
19961992
dependencies = [
19971993
"ahash",
19981994
"bytemuck",
@@ -2031,8 +2027,6 @@ dependencies = [
20312027
[[package]]
20322028
name = "egui"
20332029
version = "0.31.0"
2034-
source = "registry+https://github.com/rust-lang/crates.io-index"
2035-
checksum = "7d2768eaa6d5c80a6e2a008da1f0e062dff3c83eb2b28605ea2d0732d46e74d6"
20362030
dependencies = [
20372031
"accesskit",
20382032
"ahash",
@@ -2050,8 +2044,6 @@ dependencies = [
20502044
[[package]]
20512045
name = "egui-wgpu"
20522046
version = "0.31.0"
2053-
source = "registry+https://github.com/rust-lang/crates.io-index"
2054-
checksum = "6d8151704bcef6271bec1806c51544d70e79ef20e8616e5eac01facfd9c8c54a"
20552047
dependencies = [
20562048
"ahash",
20572049
"bytemuck",
@@ -2070,8 +2062,6 @@ dependencies = [
20702062
[[package]]
20712063
name = "egui-winit"
20722064
version = "0.31.0"
2073-
source = "registry+https://github.com/rust-lang/crates.io-index"
2074-
checksum = "ace791b367c1f63e6044aef2f3834904509d1d1a6912fd23ebf3f6a9af92cd84"
20752065
dependencies = [
20762066
"accesskit_winit",
20772067
"ahash",
@@ -2114,8 +2104,6 @@ dependencies = [
21142104
[[package]]
21152105
name = "egui_extras"
21162106
version = "0.31.0"
2117-
source = "registry+https://github.com/rust-lang/crates.io-index"
2118-
checksum = "b5b5cf69510eb3d19211fc0c062fb90524f43fe8e2c012967dcf0e2d81cb040f"
21192107
dependencies = [
21202108
"ahash",
21212109
"egui",
@@ -2132,8 +2120,6 @@ dependencies = [
21322120
[[package]]
21332121
name = "egui_glow"
21342122
version = "0.31.0"
2135-
source = "registry+https://github.com/rust-lang/crates.io-index"
2136-
checksum = "9a53e2374a964c3c793cb0b8ead81bca631f24974bc0b747d1a5622f4e39fdd0"
21372123
dependencies = [
21382124
"ahash",
21392125
"bytemuck",
@@ -2150,8 +2136,6 @@ dependencies = [
21502136
[[package]]
21512137
name = "egui_kittest"
21522138
version = "0.31.0"
2153-
source = "registry+https://github.com/rust-lang/crates.io-index"
2154-
checksum = "e4a9133e9f6601f7c74edc78dd46b24034bbcf1b99f1bf268ef7b65cf09560ab"
21552139
dependencies = [
21562140
"dify",
21572141
"eframe",
@@ -2222,8 +2206,6 @@ checksum = "60b1af1c220855b6ceac025d3f6ecdd2b7c4894bfe9cd9bda4fbb4bc7c0d4cf0"
22222206
[[package]]
22232207
name = "emath"
22242208
version = "0.31.0"
2225-
source = "registry+https://github.com/rust-lang/crates.io-index"
2226-
checksum = "55b7b6be5ad1d247f11738b0e4699d9c20005ed366f2c29f5ec1f8e1de180bc2"
22272209
dependencies = [
22282210
"bytemuck",
22292211
"serde",
@@ -2339,8 +2321,6 @@ dependencies = [
23392321
[[package]]
23402322
name = "epaint"
23412323
version = "0.31.0"
2342-
source = "registry+https://github.com/rust-lang/crates.io-index"
2343-
checksum = "275b665a7b9611d8317485187e5458750850f9e64604d3c58434bb3fc1d22915"
23442324
dependencies = [
23452325
"ab_glyph",
23462326
"ahash",
@@ -2359,8 +2339,6 @@ dependencies = [
23592339
[[package]]
23602340
name = "epaint_default_fonts"
23612341
version = "0.31.0"
2362-
source = "registry+https://github.com/rust-lang/crates.io-index"
2363-
checksum = "9343d356d7cac894dacafc161b4654e0881301097bdf32a122ed503d97cb94b6"
23642342

23652343
[[package]]
23662344
name = "equivalent"

Cargo.toml

+14-14
Original file line numberDiff line numberDiff line change
@@ -596,22 +596,22 @@ significant_drop_tightening = "allow" # An update of parking_lot made this trigg
596596
# Prefer patching with `branch` over `rev` and let `Cargo.lock` handle the commit hash.
597597
# That makes it easy to upade with `cargo update -p $CRATE`.
598598

599-
# ecolor = { git = "https://github.com/emilk/egui.git", branch = "master" }
600-
# eframe = { git = "https://github.com/emilk/egui.git", branch = "master" }
601-
# egui = { git = "https://github.com/emilk/egui.git", branch = "master" }
602-
# egui_extras = { git = "https://github.com/emilk/egui.git", branch = "master" }
603-
# egui_kittest = { git = "https://github.com/emilk/egui.git", branch = "master" }
604-
# egui-wgpu = { git = "https://github.com/emilk/egui.git", branch = "master" }
605-
# emath = { git = "https://github.com/emilk/egui.git", branch = "master" }
599+
#ecolor = { git = "https://github.com/emilk/egui.git", branch = "lucas/popup-based-menu" }
600+
#eframe = { git = "https://github.com/emilk/egui.git", branch = "lucas/popup-based-menu" }
601+
#egui = { git = "https://github.com/emilk/egui.git", branch = "lucas/popup-based-menu" }
602+
#egui_extras = { git = "https://github.com/emilk/egui.git", branch = "lucas/popup-based-menu" }
603+
#egui_kittest = { git = "https://github.com/emilk/egui.git", branch = "lucas/popup-based-menu" }
604+
#egui-wgpu = { git = "https://github.com/emilk/egui.git", branch = "lucas/popup-based-menu" }
605+
#emath = { git = "https://github.com/emilk/egui.git", branch = "lucas/popup-based-menu" }
606606

607607
# Useful while developing:
608-
# ecolor = { path = "../../egui/crates/ecolor" }
609-
# eframe = { path = "../../egui/crates/eframe" }
610-
# egui = { path = "../../egui/crates/egui" }
611-
# egui_extras = { path = "../../egui/crates/egui_extras" }
612-
# egui_kittest = { path = "../../egui/crates/egui_kittest" }
613-
# egui-wgpu = { path = "../../egui/crates/egui-wgpu" }
614-
# emath = { path = "../../egui/crates/emath" }
608+
ecolor = { path = "../egui/crates/ecolor" }
609+
eframe = { path = "../egui/crates/eframe" }
610+
egui = { path = "../egui/crates/egui" }
611+
egui_extras = { path = "../egui/crates/egui_extras" }
612+
egui_kittest = { path = "../egui/crates/egui_kittest" }
613+
egui-wgpu = { path = "../egui/crates/egui-wgpu" }
614+
emath = { path = "../egui/crates/emath" }
615615

616616
egui_plot = { git = "https://github.com/emilk/egui_plot.git", branch = "main" } # 2025-02-20 - everything is id identified, allowing for instance reading out hidden items reliable
617617
# egui_plot = { path = "../../egui_plot/egui_plot" }

crates/viewer/re_blueprint_tree/src/blueprint_tree.rs

+3-3
Original file line numberDiff line numberDiff line change
@@ -1141,7 +1141,7 @@ fn add_new_view_or_container_menu_button(
11411141
))
11421142
.clicked()
11431143
{
1144-
ui.close_menu();
1144+
ui.close();
11451145

11461146
// If a single container is selected, we use it as target. Otherwise, we target the
11471147
// root container.
@@ -1192,7 +1192,7 @@ fn set_blueprint_to_default_menu_buttons(ctx: &ViewerContext<'_>, ui: &mut egui:
11921192
};
11931193

11941194
if response.clicked() {
1195-
ui.close_menu();
1195+
ui.close();
11961196
ctx.command_sender()
11971197
.send_system(re_viewer_context::SystemCommand::ClearActiveBlueprint);
11981198
}
@@ -1214,7 +1214,7 @@ fn set_blueprint_to_auto_menu_button(ctx: &ViewerContext<'_>, ui: &mut egui::Ui)
12141214
.on_hover_text("Re-populate viewport with automatically chosen views")
12151215
.clicked()
12161216
{
1217-
ui.close_menu();
1217+
ui.close();
12181218
ctx.command_sender()
12191219
.send_system(re_viewer_context::SystemCommand::ClearActiveBlueprintAndEnableHeuristics);
12201220
}

crates/viewer/re_context_menu/src/actions/add_entities_to_new_view.rs

+1-1
Original file line numberDiff line numberDiff line change
@@ -51,7 +51,7 @@ impl ContextMenuAction for AddEntitiesToNewViewAction {
5151
let btn = egui::Button::image_and_text(class.icon(), class.display_name());
5252
if ui.add(btn).clicked() {
5353
create_view_for_selected_entities(ctx, *identifier);
54-
ui.close_menu();
54+
ui.close();
5555
}
5656
}
5757
};

crates/viewer/re_context_menu/src/lib.rs

+2-2
Original file line numberDiff line numberDiff line change
@@ -85,7 +85,7 @@ fn context_menu_ui_for_item_with_context_impl(
8585
) {
8686
item_response.context_menu(|ui| {
8787
if ui.input_mut(|i| i.consume_key(egui::Modifiers::NONE, egui::Key::Escape)) {
88-
ui.close_menu();
88+
ui.close();
8989
return;
9090
}
9191

@@ -225,7 +225,7 @@ fn show_context_menu_for_selection(ctx: &ContextMenuContext<'_>, ui: &mut egui::
225225

226226
let response = action.ui(ctx, ui);
227227
if response.clicked() {
228-
ui.close_menu();
228+
ui.close();
229229
}
230230
}
231231

crates/viewer/re_context_menu/src/sub_menu.rs

+1-1
Original file line numberDiff line numberDiff line change
@@ -31,7 +31,7 @@ impl ContextMenuAction for SubMenu {
3131

3232
let response = action.ui(ctx, ui);
3333
if response.clicked() {
34-
ui.close_menu();
34+
ui.close();
3535
}
3636
}
3737
})

crates/viewer/re_selection_panel/src/defaults_ui.rs

+1-1
Original file line numberDiff line numberDiff line change
@@ -321,7 +321,7 @@ fn add_popup_ui(
321321
}
322322
}
323323

324-
ui.close_menu();
324+
ui.close();
325325
}
326326
}
327327
}

crates/viewer/re_selection_panel/src/visualizer_ui.rs

+6-6
Original file line numberDiff line numberDiff line change
@@ -460,7 +460,7 @@ fn menu_more(
460460
.clicked()
461461
{
462462
ctx.clear_blueprint_component_by_name(override_path, component_name);
463-
ui.close_menu();
463+
ui.close();
464464
}
465465

466466
if ui
@@ -474,12 +474,12 @@ fn menu_more(
474474
if let Some(raw_default) = raw_default {
475475
ctx.save_blueprint_array(override_path, component_name, raw_default);
476476
}
477-
ui.close_menu();
477+
ui.close();
478478
}
479479

480480
if ui.button("Set to fallback value").clicked() {
481481
ctx.save_blueprint_array(override_path, component_name, raw_fallback);
482-
ui.close_menu();
482+
ui.close();
483483
}
484484

485485
let override_differs_from_default = raw_override
@@ -496,7 +496,7 @@ fn menu_more(
496496
.clicked()
497497
{
498498
ctx.reset_blueprint_component_by_name(override_path, component_name);
499-
ui.close_menu();
499+
ui.close();
500500
}
501501

502502
if ui.button("Make default for current view").clicked() {
@@ -505,7 +505,7 @@ fn menu_more(
505505
component_name,
506506
raw_current_value,
507507
);
508-
ui.close_menu();
508+
ui.close();
509509
}
510510
}
511511

@@ -536,7 +536,7 @@ fn menu_add_new_visualizer(
536536

537537
ctx.save_blueprint_component(override_path, &component);
538538

539-
ui.close_menu();
539+
ui.close();
540540
}
541541
}
542542
}

crates/viewer/re_ui/src/command.rs

+1-1
Original file line numberDiff line numberDiff line change
@@ -480,7 +480,7 @@ impl UICommand {
480480

481481
if response.clicked() {
482482
command_sender.send_ui(self);
483-
ui.close_menu();
483+
ui.close();
484484
}
485485

486486
response

crates/viewer/re_view/src/view_property_ui.rs

+2-2
Original file line numberDiff line numberDiff line change
@@ -212,7 +212,7 @@ If no default blueprint was set or it didn't set any value for this field, this
212212
);
213213
if response.clicked() {
214214
ctx.reset_blueprint_component_by_name(&property.blueprint_store_path, component_name);
215-
ui.close_menu();
215+
ui.close();
216216
}
217217

218218
let response = ui
@@ -227,7 +227,7 @@ This has the same effect as not setting the value in the blueprint at all."
227227
.on_disabled_hover_text("The property is already unset.");
228228
if response.clicked() {
229229
ctx.clear_blueprint_component_by_name(&property.blueprint_store_path, component_name);
230-
ui.close_menu();
230+
ui.close();
231231
}
232232

233233
// TODO(andreas): The next logical thing here is now to save it to the default blueprint!

crates/viewer/re_viewer/src/ui/rerun_menu.rs

+18-15
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,7 @@
11
//! The main Rerun drop-down menu found in the top panel.
22
3-
use egui::NumExt as _;
3+
use egui::containers::menu::MenuConfig;
4+
use egui::{NumExt as _, PopupCloseBehavior};
45

56
use re_ui::UICommand;
67
use re_viewer_context::StoreContext;
@@ -98,17 +99,19 @@ impl App {
9899
backend_menu_ui(&self.command_sender, ui, render_state);
99100

100101
#[cfg(debug_assertions)]
101-
ui.menu_button("Debug", |ui| {
102-
ui.style_mut().wrap_mode = Some(egui::TextWrapMode::Extend);
103-
debug_menu_options_ui(ui, &mut self.state.app_options, &self.command_sender);
104-
105-
ui.label("egui debug options:");
106-
ui.weak(format!(
107-
"pixels_per_point: {:?}",
108-
ui.ctx().pixels_per_point()
109-
));
110-
egui_debug_options_ui(ui);
111-
});
102+
egui::containers::menu::SubMenuButton::new("Debug")
103+
.config(MenuConfig::new().close_behavior(PopupCloseBehavior::CloseOnClickOutside))
104+
.ui(ui, |ui| {
105+
ui.style_mut().wrap_mode = Some(egui::TextWrapMode::Extend);
106+
debug_menu_options_ui(ui, &mut self.state.app_options, &self.command_sender);
107+
108+
ui.label("egui debug options:");
109+
ui.weak(format!(
110+
"pixels_per_point: {:?}",
111+
ui.ctx().pixels_per_point()
112+
));
113+
egui_debug_options_ui(ui);
114+
});
112115

113116
ui.add_space(SPACING);
114117

@@ -201,7 +204,7 @@ impl App {
201204
.on_hover_text("Save all data to a Rerun data file (.rrd)")
202205
.clicked()
203206
{
204-
ui.close_menu();
207+
ui.close();
205208
self.command_sender.send_ui(UICommand::SaveRecording);
206209
}
207210

@@ -218,7 +221,7 @@ impl App {
218221
)
219222
.clicked()
220223
{
221-
ui.close_menu();
224+
ui.close();
222225
self.command_sender
223226
.send_ui(UICommand::SaveRecordingSelection);
224227
}
@@ -387,7 +390,7 @@ fn debug_menu_options_ui(
387390
.send_viewport_cmd(egui::ViewportCommand::Fullscreen(false));
388391
ui.ctx()
389392
.send_viewport_cmd(egui::ViewportCommand::InnerSize(size));
390-
ui.close_menu();
393+
ui.close();
391394
}
392395
}
393396

crates/viewer/re_viewer/src/ui/top_panel.rs

+1-1
Original file line numberDiff line numberDiff line change
@@ -45,7 +45,7 @@ pub fn top_panel(
4545
}
4646
}
4747

48-
egui::menu::bar(ui, |ui| {
48+
egui::containers::menu::Bar::new().ui(ui, |ui| {
4949
ui.set_height(top_bar_style.height);
5050
ui.add_space(top_bar_style.indent);
5151

0 commit comments

Comments
 (0)