mirror of
https://github.com/hinto-janai/gupax.git
synced 2024-11-16 17:27:37 +00:00
main: fix init resolution
This commit is contained in:
parent
ca881539f1
commit
ab8322c2d0
1 changed files with 4 additions and 3 deletions
|
@ -174,8 +174,7 @@ pub struct App {
|
|||
}
|
||||
|
||||
impl App {
|
||||
fn cc(cc: &eframe::CreationContext<'_>, app: Self) -> Self {
|
||||
let resolution = cc.integration_info.window_info.size;
|
||||
fn cc(cc: &eframe::CreationContext<'_>, resolution: Vec2, app: Self) -> Self {
|
||||
init_text_styles(&cc.egui_ctx, resolution[0], crate::free::clamp_scale(app.state.gupax.selected_scale));
|
||||
cc.egui_ctx.set_visuals(VISUALS.clone());
|
||||
Self {
|
||||
|
@ -1172,9 +1171,11 @@ fn main() {
|
|||
Err(e) => warn!("Could not cleanup [gupax_tmp] folders: {}", e),
|
||||
}
|
||||
|
||||
let resolution = Vec2::new(selected_width, selected_height);
|
||||
|
||||
// Run Gupax.
|
||||
info!("/*************************************/ Init ... OK /*************************************/");
|
||||
eframe::run_native(&app.name_version.clone(), options, Box::new(|cc| Box::new(App::cc(cc, app))),);
|
||||
eframe::run_native(&app.name_version.clone(), options, Box::new(|cc| Box::new(App::cc(cc, resolution, app))),);
|
||||
}
|
||||
|
||||
impl eframe::App for App {
|
||||
|
|
Loading…
Reference in a new issue