fix:优化一些命名规范

This commit is contained in:
2025-12-19 22:03:13 +08:00
parent f64f005292
commit ba7dd09037
3 changed files with 40 additions and 17 deletions

View File

@@ -10,7 +10,7 @@ from config.config import load_config
# 导入我们的模块
from ui.core.logger import setup_logger
from utils.font_utils import install_fonts_from_directory
from ui.views.home_page import create_page
from ui.views.home_page import create_home_page
from ui.views.config_page import create_config_page
sys.stdout.reconfigure(encoding='utf-8')
@@ -63,11 +63,11 @@ def calculate_window_size():
logger.info(f"屏幕分辨率: {screen_width}x{screen_height}")
logger.info(f"设置窗口大小为: {target_width}x{target_height}")
return (target_width, target_height)
return target_width, target_height
except Exception as e:
logger.warning(f"无法获取屏幕分辨率 ({e}),使用默认大小 (900, 900)")
return (900, 900) # 失败时的默认值
return 900, 900 # 失败时的默认值
# 1. 挂载静态资源 (CSS/图片)
# 注意:这里使用 get_path 确保打包后能找到
@@ -77,7 +77,7 @@ app.add_static_files('/assets', static_dir)
# 3. 页面路由
@ui.page('/')
def index_page():
create_page()
create_home_page()
@ui.page('/config')
def config_page():