mirror of
https://github.com/CrispyPin/julia-fractal-renderer.git
synced 2024-11-22 10:00:26 +01:00
cleanup
This commit is contained in:
parent
8b4dcb39c8
commit
7b298c2d6c
1 changed files with 21 additions and 19 deletions
36
src/main.rs
36
src/main.rs
|
@ -9,7 +9,7 @@ use std::{
|
||||||
};
|
};
|
||||||
|
|
||||||
use eframe::{
|
use eframe::{
|
||||||
egui::{self, DragValue, RichText, Slider, TextureOptions},
|
egui::{self, DragValue, Slider, TextureOptions},
|
||||||
epaint::{TextureHandle, Vec2},
|
epaint::{TextureHandle, Vec2},
|
||||||
Frame, NativeOptions,
|
Frame, NativeOptions,
|
||||||
};
|
};
|
||||||
|
@ -275,23 +275,8 @@ impl eframe::App for JuliaGUI {
|
||||||
let set_iter = ui
|
let set_iter = ui
|
||||||
.add(Slider::new(&mut self.settings.iterations, 5..=256).clamp_to_range(false));
|
.add(Slider::new(&mut self.settings.iterations, 5..=256).clamp_to_range(false));
|
||||||
|
|
||||||
ui.label("Preview resolution:");
|
|
||||||
ui.horizontal(|ui| {
|
ui.horizontal(|ui| {
|
||||||
let set_width = ui.add(
|
ui.label("Preview resolution:");
|
||||||
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.menu_button("presets", |ui| {
|
ui.menu_button("presets", |ui| {
|
||||||
if ui.button("1:1 512x512").clicked() {
|
if ui.button("1:1 512x512").clicked() {
|
||||||
self.settings.width = 512;
|
self.settings.width = 512;
|
||||||
|
@ -309,6 +294,23 @@ impl eframe::App for JuliaGUI {
|
||||||
self.settings_changed = true;
|
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.label("Render iterations:");
|
||||||
ui.add(Slider::new(&mut self.export_iterations, 5..=1024).clamp_to_range(false));
|
ui.add(Slider::new(&mut self.export_iterations, 5..=1024).clamp_to_range(false));
|
||||||
|
|
Loading…
Reference in a new issue