修复 Windows 下桌面歌词最小高度设置问题(#2244)
This commit is contained in:
@@ -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,
|
||||
|
||||
@@ -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
|
||||
|
||||
Reference in New Issue
Block a user