diff --git a/publish/changeLog.md b/publish/changeLog.md index afb02435..e6bc4d59 100644 --- a/publish/changeLog.md +++ b/publish/changeLog.md @@ -1,6 +1,7 @@ ### 新增 - 新增设置-以全屏模式启动设置 +- 新增设置-桌面歌词设置-鼠标移入歌词区域时降低歌词透明度,默认关闭,注:此功能存在平台兼容性问题,若鼠标移入移出的间隔过短可能会导致无法恢复到正常透明度,这时尝试再移入移出即可恢复(#883) ### 优化 diff --git a/src/common/defaultSetting.js b/src/common/defaultSetting.js index 8904b1d9..45bd8e7b 100644 --- a/src/common/defaultSetting.js +++ b/src/common/defaultSetting.js @@ -2,7 +2,7 @@ const path = require('path') const os = require('os') const defaultSetting = { - version: '1.0.58', + version: '1.0.59', player: { togglePlayMethod: 'listLoop', highQuality: false, @@ -41,6 +41,7 @@ const defaultSetting = { theme: 0, isLockScreen: true, isDelayScroll: true, + isHoverHide: false, style: { font: '', fontSize: 120, diff --git a/src/lang/en-us.json b/src/lang/en-us.json index 78b064f1..35d050d7 100644 --- a/src/lang/en-us.json +++ b/src/lang/en-us.json @@ -269,6 +269,7 @@ "setting__desktop_lyric_enable": "Display lyrics", "setting__desktop_lyric_font": "Lyric font", "setting__desktop_lyric_font_default": "Default", + "setting__desktop_lyric_hover_hide": "Reduce the transparency of lyrics when the mouse moves into the lyrics area (this feature has platform compatibility issues)", "setting__desktop_lyric_lock": "Lock lyrics", "setting__desktop_lyric_lock_screen": "It is not allowed to drag the lyrics window out of the main screen", "setting__download": "Download", diff --git a/src/lang/zh-cn.json b/src/lang/zh-cn.json index 1214d9e7..0dd444bd 100644 --- a/src/lang/zh-cn.json +++ b/src/lang/zh-cn.json @@ -269,6 +269,7 @@ "setting__desktop_lyric_enable": "显示歌词", "setting__desktop_lyric_font": "歌词字体", "setting__desktop_lyric_font_default": "默认", + "setting__desktop_lyric_hover_hide": "鼠标移入歌词区域时降低歌词透明度(此功能存在平台兼容性问题)", "setting__desktop_lyric_lock": "锁定歌词", "setting__desktop_lyric_lock_screen": "不允许歌词窗口拖出主屏幕之外", "setting__download": "下载设置", diff --git a/src/lang/zh-tw.json b/src/lang/zh-tw.json index 190c4be0..8640b371 100644 --- a/src/lang/zh-tw.json +++ b/src/lang/zh-tw.json @@ -269,6 +269,7 @@ "setting__desktop_lyric_enable": "顯示歌詞", "setting__desktop_lyric_font": "歌詞字體", "setting__desktop_lyric_font_default": "默認", + "setting__desktop_lyric_hover_hide": "鼠標移入歌詞區域時降低歌詞透明度(此功能存在平台兼容性問題)", "setting__desktop_lyric_lock": "鎖定歌詞", "setting__desktop_lyric_lock_screen": "不允許歌詞窗口拖出主屏幕之外", "setting__download": "下載設置", diff --git a/src/main/modules/winLyric/event.js b/src/main/modules/winLyric/event.js index 4e4b8e97..7259201c 100644 --- a/src/main/modules/winLyric/event.js +++ b/src/main/modules/winLyric/event.js @@ -47,9 +47,9 @@ const setLrcConfig = () => { if (isLock != desktopLyric.isLock) { isLock = desktopLyric.isLock if (desktopLyric.isLock) { - global.modules.lyricWindow.setIgnoreMouseEvents(true, { forward: false }) + global.modules.lyricWindow.setIgnoreMouseEvents(true, { forward: true }) } else { - global.modules.lyricWindow.setIgnoreMouseEvents(false) + global.modules.lyricWindow.setIgnoreMouseEvents(false, { forward: true }) } } if (isAlwaysOnTop != desktopLyric.isAlwaysOnTop) { diff --git a/src/main/modules/winLyric/index.js b/src/main/modules/winLyric/index.js index 575f1243..2827dc6c 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: false }) + global.modules.lyricWindow.setIgnoreMouseEvents(true, { forward: true }) } // linux下每次重开时貌似要重新设置置顶 if (isLinux && global.appSetting.desktopLyric.isAlwaysOnTop) { diff --git a/src/renderer-lyric/App.vue b/src/renderer-lyric/App.vue index b4401d94..ae23bb8c 100644 --- a/src/renderer-lyric/App.vue +++ b/src/renderer-lyric/App.vue @@ -1,6 +1,6 @@