From c8210e05162da91f45edca3d9aca792e50253e57 Mon Sep 17 00:00:00 2001 From: lyswhut Date: Thu, 5 Jan 2023 11:57:44 +0800 Subject: [PATCH] =?UTF-8?q?=E4=BF=AE=E5=A4=8D=E5=88=9D=E5=A7=8B=E8=AE=BE?= =?UTF-8?q?=E7=BD=AE=E7=9A=84=E6=A1=8C=E9=9D=A2=E6=AD=8C=E8=AF=8D=E7=AA=97?= =?UTF-8?q?=E5=8F=A3=E6=B2=A1=E6=9C=89=E5=AE=8C=E5=85=A8=E5=B1=85=E5=8F=B3?= =?UTF-8?q?=E4=B8=8B=E8=A7=92=E7=9A=84=E9=97=AE=E9=A2=98?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- publish/changeLog.md | 2 +- src/main/modules/winLyric/main.ts | 6 +++--- src/main/modules/winLyric/utils.ts | 2 +- 3 files changed, 5 insertions(+), 5 deletions(-) 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