feat: set window size (#405)

This commit is contained in:
lencx
2023-02-16 22:02:12 +08:00
parent 5ec9bb5656
commit 5426a711e9
8 changed files with 50 additions and 18 deletions

View File

@@ -62,7 +62,7 @@ pub fn init(app: &mut App) -> std::result::Result<(), Box<dyn std::error::Error>
.title("ChatGPT")
.resizable(true)
.fullscreen(false)
.inner_size(800.0, 600.0)
.inner_size(app_conf2.main_width, app_conf2.main_height)
.theme(Some(theme))
.always_on_top(app_conf2.stay_on_top)
.initialization_script(&utils::user_script())

View File

@@ -18,7 +18,7 @@ pub fn tray_window(handle: &tauri::AppHandle) {
.title("ChatGPT")
.resizable(false)
.fullscreen(false)
.inner_size(360.0, 540.0)
.inner_size(app_conf.tray_width, app_conf.tray_height)
.decorations(false)
.always_on_top(true)
.theme(Some(theme))