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

@@ -34,20 +34,29 @@ pub_struct!(AppConf {
// macOS and Windows: light / dark / system
theme: String,
// auto update policy: prompt / silent / disable
isinit: bool,
main_close: bool,
auto_update: String,
tray: bool,
popup_search: bool,
stay_on_top: bool,
main_dashboard: bool,
tray_dashboard: bool,
main_origin: String,
tray_origin: String,
default_origin: String,
ua_window: String,
ua_tray: String,
save_window_state: bool,
global_shortcut: Option<String>,
default_origin: String,
// Main Window
isinit: bool,
popup_search: bool,
main_close: bool,
main_dashboard: bool,
main_origin: String,
ua_window: String,
main_width: f64,
main_height: f64,
// Tray Window
tray_width: f64,
tray_height: f64,
tray: bool,
tray_dashboard: bool,
tray_origin: String,
ua_tray: String,
});
impl AppConf {
@@ -56,6 +65,7 @@ impl AppConf {
Self {
titlebar: !cfg!(target_os = "macos"),
hide_dock_icon: false,
save_window_state: false,
theme: "light".into(),
auto_update: "prompt".into(),
tray: true,
@@ -65,6 +75,10 @@ impl AppConf {
stay_on_top: false,
main_dashboard: false,
tray_dashboard: false,
main_width: 800.0,
main_height: 600.0,
tray_width: 360.0,
tray_height: 540.0,
main_origin: CHATGPT_URL.into(),
tray_origin: CHATGPT_URL.into(),
default_origin: CHATGPT_URL.into(),