Skip to content

Commit

Permalink
Pad out top bar of event editor & graphic picker
Browse files Browse the repository at this point in the history
  • Loading branch information
melody-rs committed Jul 1, 2024
1 parent ccd34fa commit 765cb6c
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 0 deletions.
2 changes: 2 additions & 0 deletions crates/modals/src/event_graphic_picker.rs
Original file line number Diff line number Diff line change
Expand Up @@ -397,6 +397,7 @@ impl Modal {
});

egui::TopBottomPanel::top(self.id_source.with("top")).show_inside(ui, |ui| {
ui.add_space(1.0); // pad out the top
ui.horizontal(|ui| {
ui.label("Opacity");
if ui.add(egui::Slider::new(opacity, 0..=255)).changed() {
Expand All @@ -417,6 +418,7 @@ impl Modal {
ui.label("Blend Mode");
luminol_components::EnumComboBox::new(self.id_source.with("blend_mode"), blend_mode).ui(ui);
});
ui.add_space(1.0); // pad out the bottom
});
egui::TopBottomPanel::bottom(self.id_source.with("bottom")).show_inside(ui, |ui| {
ui.add_space(ui.style().spacing.item_spacing.y);
Expand Down
2 changes: 2 additions & 0 deletions crates/ui/src/windows/event_edit.rs
Original file line number Diff line number Diff line change
Expand Up @@ -95,6 +95,7 @@ impl luminol_core::Window for Window {
let id_source = self.id();
let previous_page = self.selected_page;
egui::TopBottomPanel::top(id_source.with("top_panel")).show_inside(ui, |ui| {
ui.add_space(1.0); // pad the top of the window
ui.horizontal(|ui| {
ui.label("Name: ");
ui.text_edit_singleline(&mut self.event.name);
Expand Down Expand Up @@ -124,6 +125,7 @@ impl luminol_core::Window for Window {
self.event.pages[self.selected_page] = rpg::EventPage::default();
}
});
ui.add_space(1.0); // pad the bottom of the window
});

let page = &mut self.event.pages[self.selected_page];
Expand Down

0 comments on commit 765cb6c

Please sign in to comment.