Skip to content

Commit

Permalink
[feat] enable word wrap
Browse files Browse the repository at this point in the history
1.as title
  • Loading branch information
how2051 committed Jun 30, 2024
1 parent a8fad4f commit e6b9a9a
Showing 1 changed file with 4 additions and 2 deletions.
6 changes: 4 additions & 2 deletions main.py
Original file line number Diff line number Diff line change
Expand Up @@ -92,6 +92,7 @@ def setWarninginfo(self, text):
background: #fff2f0;
}
""")
self.lab_info.setWordWrap(True) # 启用自动换行
self.lab_info.setText(text)

def setSuccessinfo(self, text):
Expand All @@ -105,6 +106,7 @@ def setSuccessinfo(self, text):
background: #f6ffed;
}
""")
self.lab_info.setWordWrap(True) # 启用自动换行
self.lab_info.setText(text)


Expand Down Expand Up @@ -157,7 +159,7 @@ def open_file(self):
json.dump(config, f)
self.load_config()
else:
self.setWarninginfo('请选择正确的文件夹!一般是WeChat Files文件夹。')
self.setWarninginfo('请选择正确的文件夹!\n一般是WeChat Files文件夹。')

def save_config(self):
self.update_config()
Expand Down Expand Up @@ -390,7 +392,7 @@ def callback(self, v):
self.bar_progress.setValue(int(value))
if value == 100:
out = "本次共清理文件" + str(self.total_file) + "个,文件夹" + str(
self.total_dir) + "个。请前往回收站检查并清空。"
self.total_dir) + "个。\n请前往回收站检查并清空。"
self.setSuccessinfo(out)
return

Expand Down

0 comments on commit e6b9a9a

Please sign in to comment.