fix(mac): 修复灵动岛刘海对齐#44
Open
xingranya wants to merge 1 commit into
Open
Conversation
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
1. macOS 刘海屏灵动岛定位
electron/main/window/dynamicIsland.ts): 覆盖通用窗口默认minWidth/minHeight,避免灵动岛被默认800x600最小尺寸撑大。electron/main/window/dynamicIsland.ts): 基于实测刘海尺寸按display.scaleFactor换算逻辑尺寸,并在 2x 屏下使用稳定的刘海基准宽高。electron/main/window/dynamicIsland.ts): snapped 模式改为基于display.bounds顶边居中吸附,不再使用workArea.y,避免显示到菜单栏下方或恢复旧坐标。electron/main/window/dynamicIsland.ts): 居中吸附时清空旧x/y,宽高变化和拖回顶部释放后都会重新对齐真实刘海位置。2. 灵动岛外观与歌词适配
windows/dynamic-island/App.vue): snapped 模式改为透明窗口中的自定义 SVG 轮廓,黑色区域从屏幕顶边开始绘制,与真机刘海视觉融合。windows/dynamic-island/App.vue): 顶部两侧增加小圆弧对接处理,底部圆角与专辑图圆角保持呼应,减少突兀直角和错位感。windows/dynamic-island/App.vue): 放宽最大展开宽度,并在渲染端增加文本缩放与省略策略,避免长歌词把窗口撑成异常长条或被硬裁断。windows/dynamic-island/App.vue): 拖离顶部后仍保持原胶囊浮窗交互,不影响自由移动使用场景。3. 验证
pnpm typecheck,类型检查通过。pnpm build:mac,构建通过,使用正常。