新增全屏时自动关闭歌词设置
This commit is contained in:
@@ -6,6 +6,7 @@ import { closeWindow, createWindow, isExistWindow } from './main'
|
||||
// import main from './main'
|
||||
// import { Event, EVENT_NAMES } from './event'
|
||||
|
||||
let isMainWidnowFullscreen = false
|
||||
|
||||
export default () => {
|
||||
initRendererEvent()
|
||||
@@ -13,17 +14,34 @@ export default () => {
|
||||
// global.app_event.winMain.
|
||||
|
||||
global.lx.event_app.on('main_window_inited', () => {
|
||||
isMainWidnowFullscreen = global.lx.appSetting['common.startInFullscreen']
|
||||
|
||||
if (global.lx.appSetting['desktopLyric.enable']) {
|
||||
if (isExistWindow()) sendMainWindowInitedEvent()
|
||||
else createWindow()
|
||||
if (global.lx.appSetting['desktopLyric.fullscreenHide'] && isMainWidnowFullscreen) {
|
||||
closeWindow()
|
||||
} else {
|
||||
if (isExistWindow()) sendMainWindowInitedEvent()
|
||||
else createWindow()
|
||||
}
|
||||
}
|
||||
})
|
||||
global.lx.event_app.on('updated_config', (keys, setting) => {
|
||||
setLrcConfig(keys, setting)
|
||||
if (keys.includes('desktopLyric.fullscreenHide') && global.lx.appSetting['desktopLyric.enable'] && isMainWidnowFullscreen) {
|
||||
if (global.lx.appSetting['desktopLyric.fullscreenHide']) closeWindow()
|
||||
else if (!isExistWindow()) createWindow()
|
||||
}
|
||||
})
|
||||
global.lx.event_app.on('main_window_close', () => {
|
||||
closeWindow()
|
||||
})
|
||||
global.lx.event_app.on('main_window_fullscreen', (isFullscreen) => {
|
||||
isMainWidnowFullscreen = isFullscreen
|
||||
if (global.lx.appSetting['desktopLyric.enable'] && global.lx.appSetting['desktopLyric.fullscreenHide']) {
|
||||
if (isFullscreen) closeWindow()
|
||||
else if (!isExistWindow()) createWindow()
|
||||
}
|
||||
})
|
||||
|
||||
|
||||
// global.lx_event.mainWindow.on(MAIN_WINDOW_EVENT_NAME.setLyricInfo, info => {
|
||||
|
||||
Reference in New Issue
Block a user