diff --git a/publish/changeLog.md b/publish/changeLog.md index 58339847..2052cae0 100644 --- a/publish/changeLog.md +++ b/publish/changeLog.md @@ -1,7 +1,7 @@ ### 新增 - 新增设置-以全屏模式启动设置 -- 新增设置-桌面歌词设置-鼠标移入歌词区域时降低歌词透明度(#883),默认关闭,注:此功能存在平台兼容性问题,若鼠标移出后无法恢复到正常透明度,可尝试再移入移出即可恢复 +- 新增设置-桌面歌词设置-鼠标移入歌词区域时降低歌词透明度(#883),默认关闭,此设置不支持linux,注:此功能存在兼容性问题,若鼠标移出后无法恢复到正常透明度,可尝试再移入移出即可恢复 ### 优化 diff --git a/src/main/modules/winLyric/event.js b/src/main/modules/winLyric/event.js index 7259201c..f29a9997 100644 --- a/src/main/modules/winLyric/event.js +++ b/src/main/modules/winLyric/event.js @@ -2,6 +2,7 @@ const { common: COMMON_EVENT_NAME, winLyric: WIN_LYRIC_EVENT_NAME, hotKey: HOT_K const { mainSend, NAMES: { winLyric: ipcWinLyricNames } } = require('../../../common/ipc') const { desktop_lyric } = require('../../../common/hotKey') const { getLyricWindowBounds } = require('./utils') +const { isLinux } = require('@common/utils') let isLock = null let isEnable = null @@ -47,9 +48,9 @@ const setLrcConfig = () => { if (isLock != desktopLyric.isLock) { isLock = desktopLyric.isLock if (desktopLyric.isLock) { - global.modules.lyricWindow.setIgnoreMouseEvents(true, { forward: true }) + global.modules.lyricWindow.setIgnoreMouseEvents(true, { forward: !isLinux }) } else { - global.modules.lyricWindow.setIgnoreMouseEvents(false, { forward: true }) + global.modules.lyricWindow.setIgnoreMouseEvents(false, { forward: !isLinux }) } } if (isAlwaysOnTop != desktopLyric.isAlwaysOnTop) { diff --git a/src/main/modules/winLyric/index.js b/src/main/modules/winLyric/index.js index 2827dc6c..754d7778 100644 --- a/src/main/modules/winLyric/index.js +++ b/src/main/modules/winLyric/index.js @@ -64,7 +64,7 @@ const winEvent = lyricWindow => { lyricWindow.once('ready-to-show', () => { lyricWindow.show() if (global.appSetting.desktopLyric.isLock) { - global.modules.lyricWindow.setIgnoreMouseEvents(true, { forward: true }) + global.modules.lyricWindow.setIgnoreMouseEvents(true, { forward: !isLinux }) } // linux下每次重开时貌似要重新设置置顶 if (isLinux && global.appSetting.desktopLyric.isAlwaysOnTop) { diff --git a/src/renderer/views/setting/components/SettingDesktopLyric.vue b/src/renderer/views/setting/components/SettingDesktopLyric.vue index 701a5b93..602bec58 100644 --- a/src/renderer/views/setting/components/SettingDesktopLyric.vue +++ b/src/renderer/views/setting/components/SettingDesktopLyric.vue @@ -13,7 +13,7 @@ dd base-checkbox(id="setting_desktop_lyric_alwaysOnTopLoop" v-model="currentStting.desktopLyric.isAlwaysOnTopLoop" :label="$t('setting__desktop_lyric_always_on_top_loop')") .gap-top base-checkbox(id="setting_desktop_lyric_lockScreen" v-model="currentStting.desktopLyric.isLockScreen" :label="$t('setting__desktop_lyric_lock_screen')") - .gap-top + .gap-top(v-if="!isLinux") base-checkbox(id="setting_desktop_lyric_hoverHide" v-model="currentStting.desktopLyric.isHoverHide" :label="$t('setting__desktop_lyric_hover_hide')") dd h3#desktop_lyric_font {{$t('setting__desktop_lyric_font')}} @@ -25,6 +25,7 @@ dd import { ref, computed, useI18n } from '@renderer/utils/vueTools' import { getSystemFonts } from '@renderer/utils/tools' import { currentStting } from '../setting' +import { isLinux } from '@common/utils' export default { name: 'SettingDesktopLyric', @@ -41,6 +42,7 @@ export default { return { currentStting, fontList, + isLinux, } }, }