Skip to content

1#858

Merged
kazukokawagawa merged 6 commits intodev-ipcfrom
dev
Feb 10, 2026
Merged

1#858
kazukokawagawa merged 6 commits intodev-ipcfrom
dev

Conversation

@kazukokawagawa
Copy link
Collaborator

No description provided.

kazukokawagawa and others added 6 commits February 9, 2026 19:35
添加歌词字体大小自适应模式,可根据窗口高度自动缩放歌词大小,避免全屏时过小或窗口时过大。新增设置选项允许用户在固定大小和自适应模式之间切换,并更新了歌词预览和播放器组件以支持新的字体大小计算逻辑。
将多个组件中重复的字体大小计算逻辑提取到统一的工具函数 getFontSize 中
该函数根据字体大小模式(自适应或固定)返回相应的 CSS 值
feat(歌词): 增加自适应歌词字体大小模式  添加歌词字体大小自适应模式,可根据窗口高度自动缩放歌词大小,避免全屏时过小或窗口时过大。新增设置选项允许用户在固定大小和自适应模式之间切换,并更新了歌词预览和播放器组件以支持新的字体大小计算逻辑。
…taskbar-window

🦄 refactor: 优化在任务栏歌词窗口中的开发者工具打开
@kazukokawagawa kazukokawagawa merged commit 9e793da into dev-ipc Feb 10, 2026
9 checks passed
@gemini-code-assist
Copy link
Contributor

Summary of Changes

Hello @kazukokawagawa, I'm Gemini Code Assist1! I'm currently reviewing this pull request and will post my feedback shortly. In the meantime, here's a summary to help you and other reviewers quickly get up to speed!

此拉取请求对歌词显示和开发者体验进行了重要改进。它引入了自适应歌词字体大小机制,可根据窗口高度动态调整字体大小,确保在不同窗口状态下都能获得最佳可读性。此外,通过为任务栏歌词窗口提供 F12 快捷键来切换分离式开发者工具,增强了其调试能力,这对于调试其紧凑界面至关重要。QRC 歌词解析器也得到了增强,能够更稳健地处理格式不正确的 XML 结构,从而提高了歌词解析的可靠性。

Highlights

  • 自适应歌词字体大小: 引入了歌词字体大小自适应功能,可根据窗口高度自动缩放歌词,以确保在全屏或窗口模式下都能保持良好的可读性。新增了 lyricFontSizeMode 设置和 getFontSize 工具函数来支持此功能。
  • 任务栏歌词窗口开发者工具: 为任务栏歌词窗口添加了 F12 快捷键,用于切换分离模式的开发者工具。这解决了任务栏窗口过小导致默认嵌入式开发者工具无法使用的问题,极大地提升了调试体验。
  • QRC 歌词解析器增强: 改进了 QRC 歌词解析器,使其能够更健壮地处理非标准 XML 属性引用(例如引号未正确转义的情况),并添加了 XML 实体解码功能,提高了歌词解析的兼容性和准确性。
Changelog
  • electron/main/windows/taskbar-lyric-window.ts
    • 为任务栏歌词窗口添加了 F12 快捷键,用于切换分离模式的开发者工具。
  • src/components/Player/PlayerLyric/AMLyric.vue
    • 更新了歌词字体大小计算方式,以使用新的 getFontSize 工具函数,支持自适应大小。
  • src/components/Player/PlayerLyric/DefaultLyric.vue
    • 更新了主歌词、翻译歌词和音译歌词的字体大小计算方式,以使用新的 getFontSize 工具函数,支持自适应大小。
  • src/components/Setting/components/LyricPreview.vue
    • 更新了预览组件中的歌词字体大小计算方式,以使用新的 getFontSize 工具函数,并移除了 calc(* 1px) 以直接使用变量。
    • 导入了 getFontSize 工具函数。
  • src/components/Setting/config/lyric.ts
    • 添加了新的 lyricFontSizeMode(自适应/固定)设置。
    • 更新了歌词字体大小设置的描述,以反映新的自适应模式。
  • src/stores/setting.ts
    • 在设置状态接口中添加了 lyricFontSizeMode 属性。
    • lyricFontSizeMode 的默认值初始化为 "adaptive"。
  • src/utils/lyric/qrc-parser.ts
    • 改进了 QRC 解析器,以处理非标准 XML 属性引用(贪婪匹配)。
    • 添加了 XML 实体解码功能。
  • src/utils/style.ts
    • 新增了 getFontSize 工具函数,用于根据自适应或固定模式计算字体大小。
Activity
  • 未提供人类活动信息。
Using Gemini Code Assist

The full guide for Gemini Code Assist can be found on our documentation page, here are some quick tips.

Invoking Gemini

You can request assistance from Gemini at any point by creating a comment using either /gemini <command> or @gemini-code-assist <command>. Below is a summary of the supported commands on the current page.

Feature Command Description
Code Review /gemini review Performs a code review for the current pull request in its current state.
Pull Request Summary /gemini summary Provides a summary of the current pull request in its current state.
Comment @gemini-code-assist Responds in comments when explicitly tagged, both in pull request comments and review comments.
Help /gemini help Displays a list of available commands.

Customization

To customize Gemini Code Assist for GitHub experience, repository maintainers can create a configuration file and/or provide a custom code review style guide (such as PEP-8 for Python) by creating and adding files to a .gemini/ folder in the base of the repository. Detailed instructions can be found here.

Limitations & Feedback

Gemini Code Assist may make mistakes. Please leave feedback on any instances where its feedback is incorrect or counter productive. You can react with 👍 and 👎 on @gemini-code-assist comments. If you're interested in giving your feedback about your experience with Gemini Code Assist for Github and other Google products, sign up here.

You can also get AI-powered code generation, chat, as well as code reviews directly in the IDE at no cost with the Gemini Code Assist IDE Extension.

Footnotes

  1. Review the Privacy Notices, Generative AI Prohibited Use Policy, Terms of Service, and learn how to configure Gemini Code Assist in GitHub here. Gemini can make mistakes, so double check it and use code with caution.

Copy link
Contributor

@gemini-code-assist gemini-code-assist bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Code Review

This pull request introduces an adaptive font size feature for lyrics, allowing them to scale with the window height. This is controlled by a new "Adaptive lyric size" setting. The implementation is clean, centralizing the logic in a new getFontSize utility. Additionally, the QRC lyric parser has been improved to handle non-standard files with unescaped quotes, and a developer experience enhancement has been added to open DevTools in a detached window for the taskbar lyric component. The changes are well-implemented. I have one minor suggestion for improving type safety in the new utility function.

* @param mode 字体大小模式 ('adaptive' | 'fixed')
* @returns CSS font-size 字符串
*/
export const getFontSize = (size: number, mode: string) => {
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

medium

For better type safety, it's recommended to use a more specific type for the mode parameter instead of string. Based on its usage with settingStore.lyricFontSizeMode, the type should be 'fixed' | 'adaptive'.

Suggested change
export const getFontSize = (size: number, mode: string) => {
export const getFontSize = (size: number, mode: "fixed" | "adaptive") => {

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants