This repository was archived by the owner on Mar 23, 2026. It is now read-only.
fix: 缩放不生效#856
Merged
Merged
Conversation
🧪 静态检查结果
🕒 检查时间:2025-08-13 09:42:18 UTC / 2025-08-13 17:42:18 UTC+8 🚨 严重错误❌ PyLint 严重错误(点我展开)❌ MyPy 严重错误(点我展开)📋 其他检查🔍 PyLint 提示(点我展开)🔍 MyPy 提示(点我展开)喵 |
baiyao105
approved these changes
Aug 13, 2025
ChimeYao-bot
left a comment
Collaborator
There was a problem hiding this comment.
✅ AI代码审查报告
总体评分: 80.0/100
审查状态: ✅ 通过
总结: 代码变更主要涉及QT缩放因子的设置位置调整,从main.py移动到i18n_manager.py,这是一个合理的重构。但仍有一些可以改进的地方。
📊 问题统计
- ℹ️ Info: 3
⚠️ Warning: 1
🤖 此审查由AI助手自动生成,详细评论请查看文件中的具体建议
| @@ -254,6 +254,8 @@ def init_from_config(self): | |||
| QApplication.setAttribute(Qt.AA_EnableHighDpiScaling) | |||
Collaborator
There was a problem hiding this comment.
Warning: 没有对config_center.read_conf('General', 'scale')的返回值进行验证或异常处理
建议添加try-catch块处理可能的异常,并对返回值进行验证
| @@ -254,6 +254,8 @@ def init_from_config(self): | |||
| QApplication.setAttribute(Qt.AA_EnableHighDpiScaling) | |||
Collaborator
There was a problem hiding this comment.
Info: 缺少对QT_SCALE_FACTOR环境变量的类型转换
建议添加float转换确保数值类型正确
| @@ -254,6 +254,8 @@ def init_from_config(self): | |||
| QApplication.setAttribute(Qt.AA_EnableHighDpiScaling) | |||
Collaborator
There was a problem hiding this comment.
Info: 文件末尾缺少换行符
建议在文件末尾添加换行符
Collaborator
There was a problem hiding this comment.
Info: scale_factor变量仍然保留但不再使用
建议移除scale_factor变量或保留用于日志记录
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to subscribe to this conversation on GitHub.
Already have an account?
Sign in.
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
No description provided.