更新 #50

Merged
p9o3yklam merged 8 commits from main into maziang 4 months ago

5
.gitignore vendored

@ -211,6 +211,11 @@ dist_package/
/resources/user_data/
/resources/cache/
# Resources - keep icons and config
!/resources/config/
!/resources/config/icons/
!/resources/icons/
# Test reports
htmlcov/
.coverage

@ -87,7 +87,7 @@
- 实现多重IP定位备份机制
- 添加智能城市名解析和映射
- 优化API调用性能和错误恢复
- 增强代码模块化和可维护性
- 增强代码模块化和可维护性
## [0.2.1] - 2025-10-20
@ -126,4 +126,29 @@
- 新增断点记录
- 改进页面更像word
- 新增切换输入模式功能
- 详细天气模块中,去除天气预报,只显示当前天气
<<<<<<< HEAD
- 详细天气模块中,去除天气预报,只显示当前天气
=======
- 详细天气模块中,去除天气预报,只显示当前天气
## [0.2.2] - 2025-10-25
### 修改
- 更改应用程序图标:现在使用类似 Microsoft Word 的图标,但将字母 "W" 更改为 "M" 以代表 MagicWord
- 图标文件位于 `resources/icons/app_icon.png`
- 支持多种分辨率的图标32x32, 64x64, 128x128, 256x256
## [0.2.3] - 2025-10-26
### 新增
- 全新的 Word 风格用户界面
- 功能区Ribbon设计
- 改进的文档处理功能
- 天气显示功能
- 每日一句名言功能
### 修改
- 重构了整个用户界面以模仿 Microsoft Word
- 改进了打字伪装功能
- 增强了文件处理能力
>>>>>>> shixinglin

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.4 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 2.8 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 372 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 763 B

@ -89,8 +89,22 @@ def main():
app.setOrganizationName("MagicWord")
# 设置窗口图标(如果存在)
icon_path = os.path.join(project_root, 'resources', 'icons', 'app_icon.png')
if os.path.exists(icon_path):
icon_files = [
'app_icon_32*32.png',
'app_icon_64*64.png',
'app_icon_128*128.png',
'app_icon_256*256.png',
'app_icon.png'
]
icon_path = None
for icon_file in icon_files:
test_path = os.path.join(project_root, 'resources', 'icons', icon_file)
if os.path.exists(test_path):
icon_path = test_path
break
if icon_path and os.path.exists(icon_path):
app.setWindowIcon(QIcon(icon_path))
else:
# 使用默认图标

@ -101,8 +101,24 @@ class WordStyleMainWindow(QMainWindow):
"""设置窗口图标"""
# 使用我们创建的Word风格图标
project_root = os.path.dirname(os.path.dirname(os.path.abspath(__file__)))
icon_path = os.path.join(project_root, 'resources', 'icons', 'app_icon.png')
if os.path.exists(icon_path):
# 尝试不同的图标文件
icon_files = [
'app_icon_32*32.png',
'app_icon_64*64.png',
'app_icon_128*128.png',
'app_icon_256*256.png',
'app_icon.png'
]
icon_path = None
for icon_file in icon_files:
test_path = os.path.join(project_root, 'resources', 'icons', icon_file)
if os.path.exists(test_path):
icon_path = test_path
break
if icon_path and os.path.exists(icon_path):
self.setWindowIcon(QIcon(icon_path))
else:
# 如果图标文件不存在创建简单的Word风格图标
@ -174,17 +190,6 @@ class WordStyleMainWindow(QMainWindow):
}
print(f"格式化后的数据: {formatted_data}")
self.update_weather_display(formatted_data)
project_root = os.path.dirname(os.path.dirname(os.path.abspath(__file__)))
icon_path = os.path.join(project_root, 'resources', 'icons', 'app_icon.png')
if os.path.exists(icon_path):
self.setWindowIcon(QIcon(icon_path))
else:
# 如果图标文件不存在创建简单的Word风格图标
icon = QIcon()
pixmap = QPixmap(32, 32)
pixmap.fill(QColor("#2B579A"))
icon.addPixmap(pixmap)
self.setWindowIcon(icon)
def setup_ui(self):
"""设置Word风格的UI界面"""

Loading…
Cancel
Save