mirror of
https://github.com/CrispyPin/julia-fractal-renderer.git
synced 2024-11-22 01:50: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(RichText::new("Render settings").heading());
|
||||||
ui.label("preview resolution:");
|
ui.label("preview resolution:");
|
||||||
ui.horizontal(|ui| {
|
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");
|
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() {
|
if set_width.changed() || set_height.changed() {
|
||||||
self.settings_changed = true;
|
self.settings_changed = true;
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in a new issue