diff --git a/FAQ.md b/FAQ.md index 5be6b657..6582e0b3 100644 --- a/FAQ.md +++ b/FAQ.md @@ -39,9 +39,9 @@ ## 桌面歌词显示异常 -### Windows 7系统桌面歌词显示异常 +### Windows 7 系统桌面歌词显示异常 -Windows 7未开启 Aero 效果时桌面歌词会有问题,详情看下面的**Windows 7 下界面异常(界面显示不完整)**方法解决。 +Windows 7 未开启 Aero 效果时桌面歌词会有问题,详情看下面的**Windows 7 下界面异常(界面显示不完整)**方法解决。 ### MAC OS系统、桌面歌词有残留阴影 @@ -52,9 +52,9 @@ Windows 7未开启 Aero 效果时桌面歌词会有问题,详情看下面的** ### Linux系统下桌面歌词窗口异常 -目前在Ubuntu 18.10下第一次开启桌面歌词时歌词窗口会变白,需要关闭后再开启, +目前在 Ubuntu 18.10 下第一次开启桌面歌词时歌词窗口会变白,需要关闭后再开启, -其他Linux系统未测试,如有异常也是意料之中,目前不打算去处理Linux平台的桌面歌词问题。 +其他 Linux 系统未测试,如有异常也是意料之中,目前不打算去处理 Linux 平台的桌面歌词问题。 ## 软件安装包说明 diff --git a/package-lock.json b/package-lock.json index c5ea13fb..ecde64cd 100644 --- a/package-lock.json +++ b/package-lock.json @@ -1,6 +1,6 @@ { "name": "lx-music-desktop", - "version": "1.0.0-beta3", + "version": "1.0.0", "lockfileVersion": 1, "requires": true, "dependencies": { @@ -7232,9 +7232,9 @@ }, "dependencies": { "@types/node": { - "version": "12.12.51", - "resolved": "https://registry.npmjs.org/@types/node/-/node-12.12.51.tgz", - "integrity": "sha512-6ILqt8iNThALrxDv2Q4LyYFQxULQz96HKNIFd4s9QRQaiHINYeUpLqeU/2IU7YMtvipG1fQVAy//vY8/fX1Y9w==", + "version": "12.12.53", + "resolved": "https://registry.npmjs.org/@types/node/-/node-12.12.53.tgz", + "integrity": "sha512-51MYTDTyCziHb70wtGNFRwB4l+5JNvdqzFSkbDvpbftEgVUBEE+T5f7pROhWMp/fxp07oNIEQZd5bbfAH22ohQ==", "dev": true } } diff --git a/publish/changeLog.md b/publish/changeLog.md index f0882f1a..f43b7edb 100644 --- a/publish/changeLog.md +++ b/publish/changeLog.md @@ -1,56 +1,7 @@ -### 新增 - -- 新增`rpm`、`pacman`包的构建(未测试可用性) -- 新增因系统音频设备列表改变导致的当前音频输出设备改变时是否暂停播放的设置,默认关闭 -- 新增歌曲列表右击菜单 -- 新增自定义列表,创建列表的按钮在表头`#`左侧,鼠标移上去才会显示;编辑列表名字时,按`ESC`键可快速取消编辑,按回车键或使输入框失去焦点即可保存列表名字,右击列表可编辑已创建的列表,“试听列表”与“我的收藏”两个列表固定不可编辑 -- 改变排行榜布局,新增更多排行榜 -- 新增我的列表右键菜单复制歌曲名选项 -- 新增桌面歌词,默认关闭,可到设置或者托盘菜单开启(建议使用全局快捷键控制);调整字体大小、透明度时,鼠标左击按钮正常调整,右击微调;**Windows 7未开启Aero效果时桌面歌词会有问题**,详情看常见问题解决;Linux版桌面歌词有问题,以后再尝试优化; -- 新增“清热板蓝”皮肤 -- 新增软件最小化、关闭按钮位置设置,MAC版默认为左边,非MAC为右边,不想用默认的可到设置修改 -- 新增快捷键设置,软件内快捷键默认开启,全局快捷键默认关闭(注:若想开启蓝牙耳机切歌需开启全局快捷键,当快捷键被中划线划掉时,表示当前快捷键被其他程序占用导致注册失败) -- 新增首次运行时自动根据当前系统使用的语言设置软件显示的语言 -- 新增歌词区域的触摸板、鼠标滚轮等对歌词滚动的支持 -- 为了方便支持正版资源,歌曲列表右击菜单新增跳转到当前歌曲源官方详情页菜单(注意:在本版本之前添加的虾米源歌曲无法跳转详情页,需要移除后重新搜索添加) -- 新增我的列表内歌曲搜索,在我的列表按`ctrl+f`将显示搜索框;鼠标滑过或键盘上下方向键选择搜索结果;鼠标点击或按回车键定位选中的歌曲;按`ctrl`键的情况下鼠标点击或按回车键确认定位歌曲时,将会在定位歌曲结束后播放该歌曲(搜索框激活的情况下按`esc`可快速清空搜索框/关闭搜索框) -- 新增托盘图标样式设置,可到设置-其他切换 -- 新增开关下载功能控制,默认关闭,可到设置-下载设置开启 -- 新增将歌词嵌入音频文件中,默认关闭,可到设置-下载设置开启 -- 新增当列表文件损坏时对损坏文件的备份,若出现该情况可打开`%HOMEPATH%\AppData\Roaming\lx-music-desktop`找到`playList.json.bak`尝试手动修复列表文件,列表文件以`JSON`格式存储 -- 新增在歌单详情列表按退格(Backspace)键可快速返回歌单列表 - ### 优化 -- 改进歌曲切换时的歌词滚动效果 -- 优化批量添加、删除播放列表的歌曲操作逻辑,大幅提升批量添加、删除列表歌曲的流畅度 -- 改进歌单列表展示 -- **改进聚合搜索的搜索结果排序**,修复当某些源搜索失败时导致其他源无法显示结果的问题,现在聚合搜索已达到最初的理想效果,为了使排序更精确,**建议同时输入 歌曲名 歌手名 搜索**(歌曲名在前歌手名在后),欢迎体验~! -- 压缩备份数据文件大小 +- 对我的列表歌曲搜索结果进行相似度排序 ### 修复 -- 修复按住`Ctrl`等键触发多选机制时不松开按键的情况下切换到其他窗口后再松开按键,这时切回软件不按按键都处在多选模式的问题 -- 修复Linux版开启托盘无法退出的问题 -- 修复某些情况下可能导致的音源输出问题 -- 修复某些情况下无法开始下载任务的问题 -- 修复 tab 组件边框溢出问题 -- 修复错误更新试听列表外的歌曲时间的问题 -- 修复网易音乐源歌单、排行榜歌曲列表加载显示的数量与实际不对的问题,同时支持加载大于1000首歌的歌单(歌曲大于1000首会分页),注意:目前软件一下子显示太多歌曲时会卡顿,不建议在同一列表内添加太多歌曲 -- 修复歌曲图片链接没有扩展名的情况下无法嵌入图片的问题 -- 修复无法检测最新版本时弹窗提示的显示 -- 修复某些情况下从托盘还原窗口后无法操作的问题 -- 修复Linux下无法`ctrl+a`全选的问题 -- 修复主题背景图片覆盖不全的问题 -- 修复聚合搜索音源标签的皮肤配色问题 - -### 更变 - -- 修改设置-列表-是否显示歌曲源的默认设置为选中(该变更不影响之前的设置) -- 移除浮动按钮,现在在多选完成后可鼠标右击随意一项在弹出的右键菜单中进行原来悬浮按钮的操作 -- 为了避免出现误会,现在下载弹窗中不可用的音质将直接隐藏 -- 更改初始设置的搜索设置为聚合搜索(该变更不影响之前的设置) - -### 其他 - -- 更新 Electron 到 9.1.1 +- 修复在 Windows 系统下缩放比非100%时,拖动桌面歌词会自动加大桌面歌词窗口的问题 diff --git a/src/main/modules/winLyric/index.js b/src/main/modules/winLyric/index.js index 3a6d5c86..77097586 100644 --- a/src/main/modules/winLyric/index.js +++ b/src/main/modules/winLyric/index.js @@ -67,29 +67,29 @@ const winEvent = lyricWindow => { }) } - +let offset = 8 const createWindow = () => { if (global.modules.lyricWindow) return if (!global.appSetting.desktopLyric.enable) return // const windowSizeInfo = getWindowSizeInfo(global.appSetting) let { x, y, width, height, isAlwaysOnTop } = global.appSetting.desktopLyric let { width: screenWidth, height: screenHeight } = global.envParams.workAreaSize - screenWidth += 16 - screenHeight += 16 + screenWidth += offset * 2 + screenHeight += offset * 2 if (x == null) { - x = screenWidth - width - 8 - y = screenHeight - height - 8 + x = screenWidth - width - offset + y = screenHeight - height - offset } /** * Initial window options */ global.modules.lyricWindow = new BrowserWindow({ - height: height > screenHeight ? screenHeight : height, - width: width > screenWidth ? screenWidth : width, - x: Math.max(-8, screenWidth < (width + x) ? screenWidth - width : x), - y: Math.max(-8, screenHeight < (height + y) ? screenHeight - height : y), - minWidth: 300, - minHeight: 300, + height: Math.max(height > screenHeight ? screenHeight : height, 80), + width: Math.max(width > screenWidth ? screenWidth : width, 380), + x: Math.max(-offset, screenWidth < (width + x) ? screenWidth - width : x), + y: Math.max(-offset, screenHeight < (height + y) ? screenHeight - height : y), + minWidth: 380, + minHeight: 80, useContentSize: true, frame: false, transparent: true, diff --git a/src/main/modules/winLyric/rendererEvent.js b/src/main/modules/winLyric/rendererEvent.js index a1c20495..c0ebc126 100644 --- a/src/main/modules/winLyric/rendererEvent.js +++ b/src/main/modules/winLyric/rendererEvent.js @@ -31,32 +31,33 @@ let winX let winY let wasW let wasY +let offset = 8 mainOn(ipcWinLyricNames.set_win_bounds, (event, { x = 0, y = 0, w = 0, h = 0 }) => { if (!global.modules.lyricWindow) return bounds = global.modules.lyricWindow.getBounds() wasW = global.envParams.workAreaSize.width - wasY = global.envParams.workAreaSize.height + 8 + wasY = global.envParams.workAreaSize.height + offset - bounds.width = w + bounds.width - bounds.height = h + bounds.height - if (bounds.width > wasW - 8) { - bounds.width = wasW - 8 - } else if (bounds.width < 300) { - bounds.width = 300 + bounds.width = w + bounds.height = h + if (bounds.width > wasW - offset) { + bounds.width = wasW - offset + } else if (bounds.width < 380) { + bounds.width = 380 } if (bounds.height > wasY) { - bounds.height = wasY + 8 - } else if (bounds.height < 120) { - bounds.height = 120 + bounds.height = wasY + offset + } else if (bounds.height < 80) { + bounds.height = 80 } if (x != 0) { winX = bounds.x + x - if (winX > wasW - bounds.width + 8) { - winX = wasW - bounds.width + 8 - } else if (winX < -8) { - winX = -8 + if (winX > wasW - bounds.width + offset) { + winX = wasW - bounds.width + offset + } else if (winX < -offset) { + winX = -offset } bounds.x = winX } @@ -64,12 +65,12 @@ mainOn(ipcWinLyricNames.set_win_bounds, (event, { x = 0, y = 0, w = 0, h = 0 }) winY = bounds.y + y if (winY > wasY - bounds.height) { winY = wasY - bounds.height - } else if (winY < -8) { - winY = -8 + } else if (winY < -offset) { + winY = -offset } bounds.y = winY } - // console.log(bounds) + // console.log(bounds, x, y, w, h) global.modules.lyricWindow.setBounds(bounds) }) diff --git a/src/renderer-lyric/App.vue b/src/renderer-lyric/App.vue index 3664721b..c66cfd67 100644 --- a/src/renderer-lyric/App.vue +++ b/src/renderer-lyric/App.vue @@ -134,7 +134,10 @@ export default { if (!this.resize.origin) return // if (!event.target.classList.contains('resize-' + this.resize.origin)) return // console.log(event.target) - let bounds = {} + let bounds = { + w: 0, + h: 0, + } let temp switch (this.resize.origin) { case 'left': @@ -185,6 +188,8 @@ export default { break } // console.log(bounds) + bounds.w = window.innerWidth + bounds.w + bounds.h = window.innerHeight + bounds.h rendererSend(NAMES.winLyric.set_win_bounds, bounds) }, handleMouseOver() { diff --git a/src/renderer-lyric/components/core/Lyric.vue b/src/renderer-lyric/components/core/Lyric.vue index 8d70bca4..ce6a0f94 100644 --- a/src/renderer-lyric/components/core/Lyric.vue +++ b/src/renderer-lyric/components/core/Lyric.vue @@ -218,7 +218,12 @@ export default { this.$refs.dom_lyric.scrollTop = this.lyricEvent.msDownScrollY + this.lyricEvent.msDownY - e.clientY this.startLyricScrollTimeout() } else if (this.winEvent.isMsDown) { - rendererSend(NAMES.winLyric.set_win_bounds, { x: e.clientX - this.winEvent.msDownX, y: e.clientY - this.winEvent.msDownY }) + rendererSend(NAMES.winLyric.set_win_bounds, { + x: e.clientX - this.winEvent.msDownX, + y: e.clientY - this.winEvent.msDownY, + w: window.innerWidth, + h: window.innerHeight, + }) } // if (this.volumeEvent.isMsDown) {