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,7 +275,26 @@ 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| {
ui.label("Preview resolution:");
ui.menu_button("presets", |ui| {
if ui.button("1:1 512x512").clicked() {
self.settings.width = 512;
self.settings.height = 512;
self.settings_changed = true;
}
if ui.button("16:9 960x540 (half hd)").clicked() {
self.settings.width = 960;
self.settings.height = 540;
self.settings_changed = true;
}
if ui.button("2:1 1024x512").clicked() {
self.settings.width = 1024;
self.settings.height = 512;
self.settings_changed = true;
}
});
});
ui.horizontal(|ui| {
let set_width = ui.add(
DragValue::new(&mut self.settings.width)
@ -292,23 +311,6 @@ impl eframe::App for JuliaGUI {
self.settings_changed = true;
}
});
ui.menu_button("presets", |ui| {
if ui.button("1:1 512x512").clicked() {
self.settings.width = 512;
self.settings.height = 512;
self.settings_changed = true;
}
if ui.button("16:9 960x540 (half hd)").clicked() {
self.settings.width = 960;
self.settings.height = 540;
self.settings_changed = true;
}
if ui.button("2:1 1024x512").clicked() {
self.settings.width = 1024;
self.settings.height = 512;
self.settings_changed = true;
}
});
ui.label("Render iterations:");
ui.add(Slider::new(&mut self.export_iterations, 5..=1024).clamp_to_range(false));