Skip to content

Commit

Permalink
Fix stats edit window growing in size when pasting config
Browse files Browse the repository at this point in the history
  • Loading branch information
KonaeAkira committed Dec 29, 2024
1 parent 00c7838 commit 86cd122
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 2 deletions.
4 changes: 3 additions & 1 deletion src/app.rs
Original file line number Diff line number Diff line change
Expand Up @@ -308,7 +308,10 @@ impl eframe::App for MacroSolverApp {
.open(&mut self.stats_edit_window_open)
.collapsible(false)
.resizable(false)
.min_width(400.0)
.max_width(400.0)
.show(ctx, |ui| {
ui.style_mut().spacing.item_spacing = egui::vec2(8.0, 3.0);
ui.add(StatsEdit::new(self.locale, &mut self.crafter_config));
});
}
Expand Down Expand Up @@ -429,7 +432,6 @@ impl MacroSolverApp {
fn draw_config_and_results_widget(&mut self, ui: &mut egui::Ui) {
ui.group(|ui| {
ui.style_mut().spacing.item_spacing = egui::vec2(8.0, 3.0);
// ui.set_height(560.0);
ui.vertical(|ui| {
ui.add_enabled_ui(!self.solver_pending, |ui| {
self.draw_configuration_widget(ui);
Expand Down
1 change: 0 additions & 1 deletion src/widgets/stats_edit.rs
Original file line number Diff line number Diff line change
Expand Up @@ -72,7 +72,6 @@ impl Widget for StatsEdit<'_> {
ui.ctx().animate_bool_with_time(copy_id, true, 0.0);
}

ui.add_space(button_response.rect.width() * 0.5);
let selected_job = self.crafter_config.selected_job;
let paste_id = egui::Id::new("config_paste");
let input_enabled = ui.ctx().animate_bool_with_time(paste_id, false, 0.25) == 0.0;
Expand Down

0 comments on commit 86cd122

Please sign in to comment.