This commit is contained in:
Crispy 2023-07-14 14:35:24 +02:00
parent 8b4dcb39c8
commit 7b298c2d6c

View file

@ -9,7 +9,7 @@ use std::{
};
use eframe::{
egui::{self, DragValue, RichText, Slider, TextureOptions},
egui::{self, DragValue, Slider, TextureOptions},
epaint::{TextureHandle, Vec2},
Frame, NativeOptions,
};
@ -275,23 +275,8 @@ impl eframe::App for JuliaGUI {
let set_iter = ui
.add(Slider::new(&mut self.settings.iterations, 5..=256).clamp_to_range(false));
ui.label("Preview resolution:");
ui.horizontal(|ui| {
let set_width = ui.add(
DragValue::new(&mut self.settings.width)
.clamp_range(128..=2048)
.suffix("px"),
);
ui.label("x");
let set_height = ui.add(
DragValue::new(&mut self.settings.height)
.clamp_range(128..=2048)
.suffix("px"),
);
if set_width.changed() || set_height.changed() {
self.settings_changed = true;
}
});
ui.label("Preview resolution:");
ui.menu_button("presets", |ui| {
if ui.button("1:1 512x512").clicked() {
self.settings.width = 512;
@ -309,6 +294,23 @@ impl eframe::App for JuliaGUI {
self.settings_changed = true;
}
});
});
ui.horizontal(|ui| {
let set_width = ui.add(
DragValue::new(&mut self.settings.width)
.clamp_range(128..=2048)
.suffix("px"),
);
ui.label("x");
let set_height = ui.add(
DragValue::new(&mut self.settings.height)
.clamp_range(128..=2048)
.suffix("px"),
);
if set_width.changed() || set_height.changed() {
self.settings_changed = true;
}
});
ui.label("Render iterations:");
ui.add(Slider::new(&mut self.export_iterations, 5..=1024).clamp_to_range(false));