修复 Windows 下桌面歌词最小高度设置问题(#2244)

This commit is contained in:
lyswhut
2025-01-28 19:49:33 +08:00
parent 3e13980870
commit 88e4df4388
4 changed files with 25 additions and 74 deletions
+1 -1
View File
@@ -116,7 +116,7 @@ export const createWindow = () => {
x: winSize.x,
y: winSize.y,
minWidth: 380,
minHeight: 80,
minHeight: 38,
useContentSize: true,
frame: false,
transparent: true,
+6 -4
View File
@@ -1,6 +1,6 @@
// 设置窗口位置、大小
export let minWidth = 80
export let minHeight = 50
export let minHeight = 38
// const updateBounds = (bounds: Bounds) => {
@@ -14,9 +14,11 @@ export let minHeight = 50
* @param param 新设置(相对于当前设置)
* @returns
*/
export const getLyricWindowBounds = (bounds: Electron.Rectangle, { x = 0, y = 0, w = 0, h = 0 }: LX.DesktopLyric.NewBounds): Electron.Rectangle => {
if (w < minWidth) w = minWidth
if (h < minHeight) h = minHeight
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
if (global.lx.appSetting['desktopLyric.isLockScreen']) {
if (!global.envParams.workAreaSize) return bounds