Skip to content

Commit

Permalink
Change ui.horizontal to horizontal_top
Browse files Browse the repository at this point in the history
  • Loading branch information
823984418 authored and jakobhellermann committed Dec 27, 2023
1 parent eba4ab2 commit 605077f
Showing 1 changed file with 7 additions and 7 deletions.
14 changes: 7 additions & 7 deletions crates/bevy-inspector-egui/src/reflect_inspector/mod.rs
Original file line number Diff line number Diff line change
Expand Up @@ -398,7 +398,7 @@ fn ui_for_empty_list(ui: &mut egui::Ui) -> bool {
fn ui_for_list_controls(ui: &mut egui::Ui, index: usize, len: usize) -> Option<ListOp> {
use ListOp::*;
let mut op = None;
ui.horizontal(|ui| {
ui.horizontal_top(|ui| {
if add_button(ui).on_hover_text("Add element").clicked() {
op = Some(AddElement(index));
}
Expand Down Expand Up @@ -763,7 +763,7 @@ impl InspectorUi<'_, '_> {
egui::Grid::new((id, i)).show(ui, |ui| {
ui.label(i.to_string());
let val = list.get_mut(i).unwrap();
ui.horizontal(|ui| {
ui.horizontal_top(|ui| {
changed |= self.ui_for_reflect_with_options(val, ui, id.with(i), options);
});
ui.end_row();
Expand Down Expand Up @@ -813,7 +813,7 @@ impl InspectorUi<'_, '_> {
let len = list.len();
for i in 0..len {
let val = list.get(i).unwrap();
ui.horizontal(|ui| {
ui.horizontal_top(|ui| {
self.ui_for_reflect_readonly_with_options(val, ui, id.with(i), options)
});

Expand Down Expand Up @@ -869,7 +869,7 @@ impl InspectorUi<'_, '_> {

egui::Grid::new((id, i)).show(ui, |ui| {
ui.label(i.to_string());
ui.horizontal(|ui| {
ui.horizontal_top(|ui| {
changed |= self.ui_for_reflect_many_with_options(
info.item_type_id(),
info.type_path(),
Expand Down Expand Up @@ -1039,7 +1039,7 @@ impl InspectorUi<'_, '_> {
let len = array.len();
for i in 0..len {
let val = array.get_mut(i).unwrap();
ui.horizontal(|ui| {
ui.horizontal_top(|ui| {
changed |= self.ui_for_reflect_with_options(val, ui, id.with(i), options);
});

Expand All @@ -1063,7 +1063,7 @@ impl InspectorUi<'_, '_> {
let len = array.len();
for i in 0..len {
let val = array.get(i).unwrap();
ui.horizontal(|ui| {
ui.horizontal_top(|ui| {
self.ui_for_reflect_readonly_with_options(val, ui, id.with(i), options);
});

Expand Down Expand Up @@ -1258,7 +1258,7 @@ impl InspectorUi<'_, '_> {
) -> Option<(usize, DynamicEnum)> {
let mut changed_variant = None;

ui.horizontal(|ui| {
ui.horizontal_top(|ui| {
egui::ComboBox::new(id.with("select"), "")
.selected_text(info.variant_names()[active_variant_idx])
.show_ui(ui, |ui| {
Expand Down

0 comments on commit 605077f

Please sign in to comment.