@@ -87,6 +87,25 @@ def __init__(self, parent=None):
8787 )
8888 self .autostart_switch .checkedChanged .connect (self .__on_autostart_changed )
8989
90+ # 启动显示主窗口设置
91+ self .show_startup_window_switch = SwitchButton ()
92+ self .show_startup_window_switch .setOffText (
93+ get_content_switchbutton_name_async (
94+ "basic_settings" , "show_startup_window" , "disable"
95+ )
96+ )
97+ self .show_startup_window_switch .setOnText (
98+ get_content_switchbutton_name_async (
99+ "basic_settings" , "show_startup_window" , "enable"
100+ )
101+ )
102+ self .show_startup_window_switch .setChecked (
103+ readme_settings_async ("basic_settings" , "show_startup_window" )
104+ )
105+ self .show_startup_window_switch .checkedChanged .connect (
106+ self .__on_show_startup_window_changed
107+ )
108+
90109 # 后台驻留设置
91110 self .resident_switch = SwitchButton ()
92111 self .resident_switch .setOffText (
@@ -131,6 +150,12 @@ def __init__(self, parent=None):
131150 get_content_description_async ("basic_settings" , "autostart" ),
132151 self .autostart_switch ,
133152 )
153+ self .addGroup (
154+ get_theme_icon ("ic_fluent_window_20_filled" ),
155+ get_content_name_async ("basic_settings" , "show_startup_window" ),
156+ get_content_description_async ("basic_settings" , "show_startup_window" ),
157+ self .show_startup_window_switch ,
158+ )
134159 self .addGroup (
135160 get_theme_icon ("ic_fluent_resize_20_filled" ),
136161 get_content_name_async ("basic_settings" , "background_resident" ),
@@ -176,6 +201,35 @@ def __on_autostart_changed(self, checked):
176201 parent = self .window (),
177202 )
178203
204+ def __on_show_startup_window_changed (self , checked ):
205+ update_settings ("basic_settings" , "show_startup_window" , checked )
206+ if checked :
207+ show_notification (
208+ NotificationType .SUCCESS ,
209+ NotificationConfig (
210+ title = get_content_name_async (
211+ "basic_settings" , "show_startup_window"
212+ ),
213+ content = get_content_name_async (
214+ "basic_settings" , "success_enable_content"
215+ ),
216+ ),
217+ parent = self .window (),
218+ )
219+ else :
220+ show_notification (
221+ NotificationType .INFO ,
222+ NotificationConfig (
223+ title = get_content_name_async (
224+ "basic_settings" , "show_startup_window"
225+ ),
226+ content = get_content_name_async (
227+ "basic_settings" , "info_disable_content"
228+ ),
229+ ),
230+ parent = self .window (),
231+ )
232+
179233 def __on_resident_changed (self , checked ):
180234 update_settings ("basic_settings" , "background_resident" , checked )
181235 try :
0 commit comments