mirror of
https://github.com/CrispyPin/julia-fractal-renderer.git
synced 2024-11-21 17:40:27 +01:00
limit preview resolution to prevent panic
This commit is contained in:
parent
c76f340fd7
commit
bbfb3e053c
1 changed files with 6 additions and 2 deletions
|
@ -149,9 +149,13 @@ impl eframe::App for JuliaGUI {
|
|||
ui.label(RichText::new("Render settings").heading());
|
||||
ui.label("preview resolution:");
|
||||
ui.horizontal(|ui| {
|
||||
let set_width = ui.add(DragValue::new(&mut self.render_options.width));
|
||||
let set_width = ui.add(
|
||||
DragValue::new(&mut self.render_options.width).clamp_range(128..=16384),
|
||||
);
|
||||
ui.label("x");
|
||||
let set_height = ui.add(DragValue::new(&mut self.render_options.height));
|
||||
let set_height = ui.add(
|
||||
DragValue::new(&mut self.render_options.height).clamp_range(128..=16384),
|
||||
);
|
||||
if set_width.changed() || set_height.changed() {
|
||||
self.settings_changed = true;
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue