Skip to content

Commit 7916f39

Browse files
committed
完善关闭UIA的提示
1 parent 39b7b96 commit 7916f39

3 files changed

Lines changed: 52 additions & 0 deletions

File tree

CHANGELOG/v2.3.0-beta.1/CHANGELOG.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -16,6 +16,7 @@ v2.3 - Shirako (砂狼白子) beta 1
1616
## 🐛 修复问题
1717

1818
- 修复 **UIA置顶**,提权后连重导致退出
19+
- 修复 **置顶模式**,关闭UIA置顶提示退出重开
1920

2021
## 🔧 其它变更
2122

app/Language/modules/sidebar_tray_management.py

Lines changed: 16 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -30,6 +30,14 @@
3030
"name": "已切换为UIA置顶模式,需要重启生效,是否立即重启?",
3131
"description": "UIA置顶切换后重启提示内容",
3232
},
33+
"uia_topmost_disable_restart_dialog_content": {
34+
"name": "已关闭UIA置顶模式,需要完全退出软件后重新启动才会生效",
35+
"description": "关闭UIA置顶后提示内容",
36+
},
37+
"uia_topmost_disable_restart_dialog_ok_btn": {
38+
"name": "知道了",
39+
"description": "关闭UIA置顶后提示按钮文本",
40+
},
3341
"uia_topmost_restart_dialog_restart_btn": {
3442
"name": "重启",
3543
"description": "UIA置顶切换后重启按钮文本",
@@ -142,6 +150,14 @@
142150
"name": "UIA topmost mode has been enabled. Restart now to apply changes?",
143151
"description": "Restart dialog content after switching UIA topmost",
144152
},
153+
"uia_topmost_disable_restart_dialog_content": {
154+
"name": "UIA topmost mode has been disabled. Fully exit the app and relaunch to apply.",
155+
"description": "Hint content after disabling UIA topmost",
156+
},
157+
"uia_topmost_disable_restart_dialog_ok_btn": {
158+
"name": "OK",
159+
"description": "OK button text after disabling UIA topmost",
160+
},
145161
"uia_topmost_restart_dialog_restart_btn": {
146162
"name": "Restart",
147163
"description": "Restart button text after switching UIA topmost",

app/view/settings/floating_window_management.py

Lines changed: 35 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -296,6 +296,41 @@ def floating_window_topmost_mode_combo_box_changed(self, index):
296296
"floating_window_management", "floating_window_topmost_mode"
297297
)
298298
)
299+
if previous_index == 2 and index != 2:
300+
dialog = MessageBox(
301+
get_content_name_async(
302+
"floating_window_management", "uia_topmost_restart_dialog_title"
303+
),
304+
get_content_name_async(
305+
"floating_window_management",
306+
"uia_topmost_disable_restart_dialog_content",
307+
),
308+
self.window(),
309+
)
310+
dialog.yesButton.setText(
311+
get_content_name_async(
312+
"floating_window_management",
313+
"uia_topmost_disable_restart_dialog_ok_btn",
314+
)
315+
)
316+
dialog.cancelButton.setText(
317+
get_content_name_async(
318+
"floating_window_management",
319+
"uia_topmost_restart_dialog_cancel_btn",
320+
)
321+
)
322+
if dialog.exec():
323+
update_settings(
324+
"floating_window_management", "floating_window_topmost_mode", index
325+
)
326+
else:
327+
blocker = QSignalBlocker(self.floating_window_topmost_mode_combo_box)
328+
self.floating_window_topmost_mode_combo_box.setCurrentIndex(
329+
previous_index
330+
)
331+
del blocker
332+
return
333+
299334
if index == 2 and previous_index != 2:
300335
dialog = MessageBox(
301336
get_content_name_async(

0 commit comments

Comments
 (0)