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