diff --git a/publish/changeLog.md b/publish/changeLog.md index d415c093..41e1cb07 100644 --- a/publish/changeLog.md +++ b/publish/changeLog.md @@ -1,4 +1,4 @@ ### 修复 -- 修复列表备份文件存在异常歌曲信息时无法导入的问题 +- 修复初始设置的桌面歌词窗口没有完全居右下角的问题 diff --git a/src/main/modules/winLyric/main.ts b/src/main/modules/winLyric/main.ts index 7cdda3cd..3aa4fe97 100644 --- a/src/main/modules/winLyric/main.ts +++ b/src/main/modules/winLyric/main.ts @@ -1,7 +1,7 @@ import { join } from 'path' import { BrowserWindow } from 'electron' import { debounce, isLinux } from '@common/utils' -import { getLyricWindowBounds } from './utils' +import { getLyricWindowBounds, offset } from './utils' import { mainSend } from '@common/mainIpc' import { encodePath } from '@common/utils/electron' @@ -85,8 +85,8 @@ export const createWindow = () => { let isShowTaskbar = global.lx.appSetting['desktopLyric.isShowTaskbar'] let { width: screenWidth, height: screenHeight } = global.envParams.workAreaSize if (x == null || y == null) { - x = screenWidth - width - y = screenHeight - height + x = screenWidth - width + offset + y = screenHeight - height + offset } if (isLockScreen) { let bounds = getLyricWindowBounds({ x, y, width, height }, { x: null, y: 0, w: width, h: height }) diff --git a/src/main/modules/winLyric/utils.ts b/src/main/modules/winLyric/utils.ts index 1354accc..611c3f1b 100644 --- a/src/main/modules/winLyric/utils.ts +++ b/src/main/modules/winLyric/utils.ts @@ -3,7 +3,7 @@ let winX let winY let wasW let wasH -let offset = 8 +export const offset = 8 let minWidth = 80 let minHeight = 50