Skip to content

Commit

Permalink
✨ 增加按钮保护
Browse files Browse the repository at this point in the history
  • Loading branch information
Littlefean committed Sep 18, 2024
1 parent 8cebfa2 commit 30caac7
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions main.py
Original file line number Diff line number Diff line change
Expand Up @@ -94,6 +94,8 @@ def stop_screenshots(self):
self.grab_index = 0
self.timer.stop()
self.tips_text.setText("正在生成视频……")
# 禁用按钮
self.record_button.setEnabled(False)
# 改成红色
self.tips_text.setStyleSheet("QLabel { color: red; }")
self.images_to_video(
Expand All @@ -119,6 +121,8 @@ def stop_screenshots(self):
os.rmdir(os.path.join(root, name))
os.rmdir(f"{self.output_dir}/{self.current_dir}")

# 启用按钮
self.record_button.setEnabled(True)
pass


Expand Down

0 comments on commit 30caac7

Please sign in to comment.