桌面歌词新增在任务栏显示歌词进程设置(#1063)
This commit is contained in:
@@ -31,6 +31,9 @@ const winEvent = () => {
|
||||
|
||||
browserWindow.on('closed', () => {
|
||||
browserWindow = null
|
||||
if (global.lx.appSetting['desktopLyric.enable']) {
|
||||
global.lx.event_app.update_config({ 'desktopLyric.enable': false })
|
||||
}
|
||||
})
|
||||
|
||||
browserWindow.on('move', () => {
|
||||
@@ -86,6 +89,7 @@ export const createWindow = () => {
|
||||
let height = global.lx.appSetting['desktopLyric.height']
|
||||
let isAlwaysOnTop = global.lx.appSetting['desktopLyric.isAlwaysOnTop']
|
||||
let isLockScreen = global.lx.appSetting['desktopLyric.isLockScreen']
|
||||
let isShowTaskbar = global.lx.appSetting['desktopLyric.isShowTaskbar']
|
||||
let { width: screenWidth, height: screenHeight } = global.envParams.workAreaSize
|
||||
if (x == null || y == null) {
|
||||
x = screenWidth - width
|
||||
@@ -122,7 +126,7 @@ export const createWindow = () => {
|
||||
fullscreenable: false,
|
||||
show: false,
|
||||
alwaysOnTop: isAlwaysOnTop,
|
||||
skipTaskbar: true,
|
||||
skipTaskbar: !isShowTaskbar,
|
||||
webPreferences: {
|
||||
contextIsolation: false,
|
||||
webSecurity: false,
|
||||
@@ -173,6 +177,11 @@ export const setIgnoreMouseEvents = (ignore: boolean, options?: Electron.IgnoreM
|
||||
browserWindow.setIgnoreMouseEvents(ignore, options)
|
||||
}
|
||||
|
||||
export const setSkipTaskbar = (skip: boolean) => {
|
||||
if (!browserWindow) return
|
||||
browserWindow.setSkipTaskbar(skip)
|
||||
}
|
||||
|
||||
export const setAlwaysOnTop = (flag: boolean, level?: 'normal' | 'floating' | 'torn-off-menu' | 'modal-panel' | 'main-menu' | 'status' | 'pop-up-menu' | 'screen-saver' | undefined, relativeLevel?: number | undefined) => {
|
||||
if (!browserWindow) return
|
||||
browserWindow.setAlwaysOnTop(flag, level, relativeLevel)
|
||||
|
||||
Reference in New Issue
Block a user