mirror of
https://github.com/CrispyPin/julia-fractal-renderer.git
synced 2024-11-21 17:40:27 +01:00
cleanup
This commit is contained in:
parent
8b4dcb39c8
commit
7b298c2d6c
1 changed files with 21 additions and 19 deletions
40
src/main.rs
40
src/main.rs
|
@ -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));
|
||||
|
|
Loading…
Reference in a new issue