Skip to content

Commit

Permalink
Update deprecated call
Browse files Browse the repository at this point in the history
  • Loading branch information
abey79 committed May 27, 2024
1 parent 2c75510 commit dff6728
Show file tree
Hide file tree
Showing 3 changed files with 3 additions and 15 deletions.
6 changes: 1 addition & 5 deletions crates/re_data_ui/src/editors/mod.rs
Original file line number Diff line number Diff line change
Expand Up @@ -272,11 +272,7 @@ fn edit_marker_shape_ui(
// workaround to force `ui.max_rect()` to reflect the content size
ui.set_width(item_width);

let background_x_range = ui
.spacing()
.menu_margin
.expand_rect(ui.max_rect())
.x_range();
let background_x_range = (ui.max_rect() + ui.spacing().menu_margin).x_range();

let list_ui = |ui: &mut egui::Ui| {
for marker in MarkerShape::ALL {
Expand Down
6 changes: 1 addition & 5 deletions crates/re_ui/src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -1307,11 +1307,7 @@ pub fn drop_down_menu(
.show_ui(ui, |ui| {
ui.set_min_width(min_width);

let background_x_range = ui
.spacing()
.menu_margin
.expand_rect(ui.max_rect())
.x_range();
let background_x_range = (ui.max_rect() + ui.spacing().menu_margin).x_range();

list_item::list_item_scope(ui, "inner_scope", |ui| {
full_span::full_span_scope(ui, background_x_range, |ui| {
Expand Down
6 changes: 1 addition & 5 deletions crates/re_viewer_context/src/gpu_bridge/colormap.rs
Original file line number Diff line number Diff line change
Expand Up @@ -91,11 +91,7 @@ pub fn colormap_dropdown_button_ui(
.show_ui(ui, |ui| {
ui.set_width(200.0);

let background_x_range = ui
.spacing()
.menu_margin
.expand_rect(ui.max_rect())
.x_range();
let background_x_range = (ui.max_rect() + ui.spacing().menu_margin).x_range();

list_item::list_item_scope(ui, "inner_scope", |ui| {
full_span::full_span_scope(ui, background_x_range, content_ui);
Expand Down

0 comments on commit dff6728

Please sign in to comment.