From b6f5770dc2d7fb46106bc4e032337e6e72c14e1f Mon Sep 17 00:00:00 2001 From: lyswhut Date: Fri, 2 May 2025 12:28:16 +0800 Subject: [PATCH] =?UTF-8?q?=E6=96=B0=E5=A2=9E=E3=80=8C=E8=AE=BE=E7=BD=AE?= =?UTF-8?q?=20=E2=86=92=20=E5=85=B6=E4=BB=96=E8=AE=BE=E7=BD=AE=20=E2=86=92?= =?UTF-8?q?=20=E4=B8=BB=E7=AA=97=E5=8F=A3=E4=BD=BF=E7=94=A8=E8=BD=AF?= =?UTF-8?q?=E4=BB=B6=E5=86=85=E7=BD=AE=E7=9A=84=E5=9C=86=E8=A7=92=E5=8F=8A?= =?UTF-8?q?=E9=98=B4=E5=BD=B1=E3=80=8D=E8=AE=BE=E7=BD=AE?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- publish/changeLog.md | 31 +------------------ src/common/defaultSetting.ts | 1 + src/common/types/app_setting.d.ts | 5 +++ src/lang/en-us.json | 1 + src/lang/zh-cn.json | 1 + src/lang/zh-tw.json | 1 + src/main/app.ts | 3 +- .../views/Setting/components/SettingOther.vue | 5 +++ 8 files changed, 17 insertions(+), 31 deletions(-) diff --git a/publish/changeLog.md b/publish/changeLog.md index 8bf82a05..c6c7f199 100644 --- a/publish/changeLog.md +++ b/publish/changeLog.md @@ -1,32 +1,3 @@ ### 新增 -- 新增「快进/快退5秒」自定义快捷键设置(#2289) -- 新增「设置 → 桌面歌词设置 → 暂停时提高歌词透明度」设置,默认启用(#2294) - -### 修复 - -- 修复 Windows 下桌面歌词最小高度与宽度设置问题(#2244) -- 修复 Windows 下界面缩放后移动桌面歌词会改变歌词窗口大小的问题(#2244) -- 修复 tx 歌单搜索名字、描述出现乱码的问题(#2250) -- 修复本地 FLAC 文件内嵌歌词无法读取的问题 -- 修复潜在播放暂停的问题 -- 修复 kw 歌单详情出现打开失败的问题(#2317) -- 修复 kg 热门评论无法获取的问题 -- 修复桌面歌词被遮挡时会被暂停的问题(#2320) -- 修复 kg 歌单打开失败的问题(thanks @Folltoshe) - -### 优化 - -- 允许更小的桌面歌词窗口宽度 -- 允许拖动桌面歌词控制栏空白处移动歌词窗口(#2280) -- 优化「自定义源管理」对话框在小窗口下的布局(#2247, @3gf8jv4dv) -- 优化软件文案编排(#2259, #2266, #2269, #2296, @3gf8jv4dv) - -### 变更 - -- 我的列表-歌曲菜单中的 歌曲换源 功能从之前的类似软连接的形式改成替换歌曲的形式,也就是说,现在该功能相当于快速在线搜索歌曲,确认换源后将自动将原来的歌曲删除再将选择的歌曲插入被删除歌曲的位置。 - -### 其他 - -- 更新项目文档(@3gf8jv4dv) -- 更新 Electron 到 35.2.2 +- 新增「设置 → 其他设置 → 主窗口使用软件内置的圆角及阴影」设置,默认启用,关闭后将使用系统窗口圆角及阴影样式,该设置重启软化后生效(#2360) diff --git a/src/common/defaultSetting.ts b/src/common/defaultSetting.ts index 273bfae3..c2207012 100644 --- a/src/common/defaultSetting.ts +++ b/src/common/defaultSetting.ts @@ -19,6 +19,7 @@ const defaultSetting: LX.AppSetting = { 'common.isAgreePact': false, 'common.controlBtnPosition': isMac ? 'left' : 'right', 'common.playBarProgressStyle': 'mini', + 'common.transparentWindow': false, 'common.tryAutoUpdate': true, 'common.showChangeLog': true, diff --git a/src/common/types/app_setting.d.ts b/src/common/types/app_setting.d.ts index 04ca1fe4..aeff0891 100644 --- a/src/common/types/app_setting.d.ts +++ b/src/common/types/app_setting.d.ts @@ -68,6 +68,11 @@ declare global { */ 'common.playBarProgressStyle': 'mini' | 'full' | 'middle' + /** + * 启用透明窗口 + */ + 'common.transparentWindow': boolean + /** * 尝试自动更新 */ diff --git a/src/lang/en-us.json b/src/lang/en-us.json index 04749925..2b433eec 100644 --- a/src/lang/en-us.json +++ b/src/lang/en-us.json @@ -348,6 +348,7 @@ "setting__basic_theme": "Theme", "setting__basic_theme_auto_tip": "This is a dynamic theme. You can preset a light theme and a dark theme, and then it will automatically switch to the corresponding theme you preset according to the system's light and dark theme colors.\n\nNOTE: Right-click this theme item to open the light and dark theme setting window.", "setting__basic_to_tray": "Minimize the app window to the system tray when closing it", + "setting__basic_transparent_window": "The main window uses the software built-in rounded corners and shadows (the system window rounded corners and shadow style will be used after closing, and it will take effect after restarting and softening)", "setting__basic_window_size": "Window Size", "setting__basic_window_size_big": "Big", "setting__basic_window_size_huge": "Huge", diff --git a/src/lang/zh-cn.json b/src/lang/zh-cn.json index 172383ea..d9e7395e 100644 --- a/src/lang/zh-cn.json +++ b/src/lang/zh-cn.json @@ -348,6 +348,7 @@ "setting__basic_theme": "主题颜色", "setting__basic_theme_auto_tip": "此乃动态主题,你可以预先设置一个亮色主题及暗色主题,此后将根据系统的亮、暗主题色自动切换为你预先设置的相应主题。\n\n注:鼠标右击此主题项即可打开亮、暗色主题设置窗口。", "setting__basic_to_tray": "关闭窗口时不退出软件将其最小化到系统托盘", + "setting__basic_transparent_window": "主窗口使用软件内置的圆角及阴影(关闭后将使用系统窗口圆角及阴影样式,重启软化后生效)", "setting__basic_window_size": "窗口尺寸", "setting__basic_window_size_big": "大", "setting__basic_window_size_huge": "巨大", diff --git a/src/lang/zh-tw.json b/src/lang/zh-tw.json index 1a39265d..e21e76f6 100644 --- a/src/lang/zh-tw.json +++ b/src/lang/zh-tw.json @@ -348,6 +348,7 @@ "setting__basic_theme": "主題顏色", "setting__basic_theme_auto_tip": "此乃動態主題,你可以預先設定一個亮色主題及暗色主題,此後將根據系統的亮、暗主題色自動切換為你預先設定的相應主題。\n\n註:滑鼠右擊此主題項即可開啟亮、暗色主題設定視窗。", "setting__basic_to_tray": "關閉視窗時不退出軟體將其最小化到系統匣", + "setting__basic_transparent_window": "主窗口使用軟件內置的圓角及陰影(關閉後將使用系統窗口圓角及陰影樣式,重啟軟化後生效)", "setting__basic_window_size": "視窗尺寸", "setting__basic_window_size_big": "大", "setting__basic_window_size_huge": "巨大", diff --git a/src/main/app.ts b/src/main/app.ts index 13b40985..d5f91df0 100644 --- a/src/main/app.ts +++ b/src/main/app.ts @@ -14,7 +14,7 @@ import { openDirInExplorer } from '@common/utils/electron' export const initGlobalData = () => { const envParams = parseEnvParams() - envParams.cmdParams.dt = !!envParams.cmdParams.dt + // envParams.cmdParams.dt = !!envParams.cmdParams.dt global.envParams = { cmdParams: envParams.cmdParams, @@ -281,6 +281,7 @@ export const initAppSetting = async() => { global.lx.appSetting = (await initSetting()).setting if (!dbFileExists) await migrateDBData().catch(err => { log.error(err) }) initTheme() + if (envParams.cmdParams.dt == null) envParams.cmdParams.dt = global.lx.appSetting['common.transparentWindow'] } // global.lx.theme = getTheme() diff --git a/src/renderer/views/Setting/components/SettingOther.vue b/src/renderer/views/Setting/components/SettingOther.vue index 2d4a8178..1860ec99 100644 --- a/src/renderer/views/Setting/components/SettingOther.vue +++ b/src/renderer/views/Setting/components/SettingOther.vue @@ -1,5 +1,10 @@