修复 Windows 下桌面歌词最小高度与宽度设置问题,允许更小的桌面歌词窗口宽度(#2244)

This commit is contained in:
lyswhut
2025-02-10 18:17:45 +08:00
parent 1f8df84b87
commit 92c9808bfb
8 changed files with 31 additions and 8 deletions
+5 -1
View File
@@ -3,7 +3,7 @@ import { mainOn, mainHandle } from '@common/mainIpc'
import { WIN_LYRIC_RENDERER_EVENT_NAME } from '@common/ipcNames'
import { buildLyricConfig, getLyricWindowBounds } from './utils'
import { sendNewDesktopLyricClient } from '@main/modules/winMain'
import { getBounds, getMainFrame, sendEvent, setBounds } from './main'
import { getBounds, getMainFrame, sendEvent, setBounds, setResizeable } from './main'
import { MessageChannelMain } from 'electron'
@@ -29,6 +29,10 @@ export default () => {
setBounds(getLyricWindowBounds(getBounds(), options))
})
mainOn<boolean>(WIN_LYRIC_RENDERER_EVENT_NAME.set_win_resizeable, ({ params: resizable }) => {
setResizeable(resizable)
})
mainOn(WIN_LYRIC_RENDERER_EVENT_NAME.request_main_window_channel, ({ event }) => {
if (event.senderFrame !== getMainFrame()) return
// Create a new channel ...