修复windows下界面缩放后移动桌面歌词会改变歌词窗口大小的问题(#2244)

This commit is contained in:
lyswhut
2025-02-07 12:54:41 +08:00
parent 691d835d16
commit b80d48aa91
4 changed files with 31 additions and 13 deletions
+3 -5
View File
@@ -14,11 +14,9 @@ export let minHeight = 38
* @param param 新设置(相对于当前设置)
* @returns
*/
export const getLyricWindowBounds = (bounds: Electron.Rectangle, { x = 0, y = 0, w, h }: LX.DesktopLyric.NewBounds): Electron.Rectangle => {
if (w == 0) w = bounds.width
else if (w < minWidth) w = minWidth
if (h == 0) h = bounds.height
else if (h < minHeight) h = minHeight
export const getLyricWindowBounds = (bounds: Electron.Rectangle, { x, y, w, h }: LX.DesktopLyric.NewBounds): Electron.Rectangle => {
if (w < minWidth) w = minWidth
if (h < minHeight) h = minHeight
if (global.lx.appSetting['desktopLyric.isLockScreen']) {
if (!global.envParams.workAreaSize) return bounds