mirror of
https://github.com/algerkong/AlgerMusicPlayer.git
synced 2026-04-23 15:47:23 +08:00
feat: 优化窗口大小管理功能,优化窗口状态保存与恢复逻辑
- 引入窗口大小管理器,初始化窗口大小管理 - 优化窗口状态保存与恢复,确保在迷你模式下正确应用窗口大小 - 移除不必要的代码,简化窗口管理逻辑 - 更新窗口创建逻辑,确保窗口大小和位置的正确性
This commit is contained in:
@@ -54,10 +54,7 @@ export function useZoom() {
|
||||
// 重置缩放比例到系统建议值
|
||||
const resetZoom = async () => {
|
||||
try {
|
||||
window.ipcRenderer.send('reset-content-zoom');
|
||||
// 重置后重新获取系统计算的缩放比例
|
||||
const newZoom = await window.ipcRenderer.invoke('get-content-zoom');
|
||||
zoomFactor.value = newZoom;
|
||||
setZoomFactor(1);
|
||||
} catch (error) {
|
||||
console.error('重置缩放比例失败:', error);
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user