Skip to content

Commit

Permalink
add some spacing to settings
Browse files Browse the repository at this point in the history
  • Loading branch information
nelson137 committed Jan 23, 2024
1 parent 3b37f39 commit 1a5c0d2
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 1 deletion.
5 changes: 4 additions & 1 deletion src/ui/main_menu/settings.rs
Original file line number Diff line number Diff line change
Expand Up @@ -111,7 +111,7 @@ pub fn widget(

// Add buttons to the bottom
ui.with_layout(egui::Layout::bottom_up(egui::Align::Center), |ui| {
ui.horizontal(|ui| {
let buttons_response = ui.horizontal(|ui| {
// Calculate button size and spacing
let width = ui.available_width();
let button_width = width / 4.0;
Expand Down Expand Up @@ -173,6 +173,9 @@ pub fn widget(
}
});

let buttons_rect = buttons_response.response.rect;
ui.add_space(buttons_rect.height() / 2.0);

ui.vertical(|ui| match state.tab {
SettingsTab::Controls => {
world.run_system(controls::widget, (ui, &mut state, should_reset))
Expand Down
2 changes: 2 additions & 0 deletions src/ui/main_menu/settings/controls.rs
Original file line number Diff line number Diff line change
Expand Up @@ -187,6 +187,8 @@ pub(super) fn widget(

// Render the button
row.col(|ui| {
ui.set_width(ui.available_width() * 0.92);

let button = BorderedButton::themed(
&meta.theme.buttons.small,
input.to_string(),
Expand Down

0 comments on commit 1a5c0d2

Please sign in to comment.