修复 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
@@ -3,6 +3,7 @@ import { scrollTo } from '@common/utils/renderer'
import { lyric } from '@lyric/store/lyric'
import { isPlay, setting } from '@lyric/store/state'
import { setWindowBounds } from '@lyric/utils/ipc'
import { isWin } from '@common/utils'
const getOffsetTop = (contentHeight, lineHeight) => {
switch (setting['desktopLyric.scrollAlign']) {
@@ -108,12 +109,22 @@ export default (isComputeHeight) => {
dom_lyric.value.scrollTop = msDownScrollY + msDownY - y
startLyricScrollTimeout()
} else if (winEvent.isMsDown) {
setWindowBounds({
x: x - winEvent.msDownX,
y: y - winEvent.msDownY,
w: window.innerWidth,
h: window.innerHeight,
})
// https://github.com/lyswhut/lx-music-desktop/issues/2244
if (isWin) {
setWindowBounds({
x: x - winEvent.msDownX,
y: y - winEvent.msDownY,
w: 0,
h: 0,
})
} else {
setWindowBounds({
x: x - winEvent.msDownX,
y: y - winEvent.msDownY,
w: window.innerWidth,
h: window.innerHeight,
})
}
}
}
const handleMouseMsMove = event => {