From aa5e62118495a16a5f9d732344096d7ac2cdad16 Mon Sep 17 00:00:00 2001 From: lyswhut Date: Tue, 14 Jun 2022 11:43:18 +0800 Subject: [PATCH] =?UTF-8?q?=E6=96=B0=E5=A2=9E=E8=AE=BE=E7=BD=AE-=E6=A1=8C?= =?UTF-8?q?=E9=9D=A2=E6=AD=8C=E8=AF=8D=E8=AE=BE=E7=BD=AE-=E9=BC=A0?= =?UTF-8?q?=E6=A0=87=E7=A7=BB=E5=85=A5=E6=AD=8C=E8=AF=8D=E5=8C=BA=E5=9F=9F?= =?UTF-8?q?=E6=97=B6=E9=99=8D=E4=BD=8E=E6=AD=8C=E8=AF=8D=E9=80=8F=E6=98=8E?= =?UTF-8?q?=E5=BA=A6=EF=BC=88#883=EF=BC=89?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- publish/changeLog.md | 1 + src/common/defaultSetting.js | 3 +- src/lang/en-us.json | 1 + src/lang/zh-cn.json | 1 + src/lang/zh-tw.json | 1 + src/main/modules/winLyric/event.js | 4 +- src/main/modules/winLyric/index.js | 2 +- src/renderer-lyric/App.vue | 79 ++++++++++++++++++- .../components/SettingDesktopLyric.vue | 2 + src/renderer/views/setting/setting.js | 1 + 10 files changed, 88 insertions(+), 7 deletions(-) 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 @@