fix(startup): splash 透明背景 + 卡片化,避免长启动时左半白屏#291
Merged
Conversation
用户反馈:当启动时间较长时(凭据迁移 / 权限 probe / hotkey hook 还没
ready),窗口左侧出现白色矩形并显示「OpenLess 正在启动」,本应是纯
磨砂玻璃背景。
根因:main window 在 tauri.conf.json 是 transparent + macOSPrivateApi
(NSVisualEffectView vibrancy)。但 StartupShell 之前用:
background: linear-gradient(180deg, rgba(245,245,247,0.96), ...)
96% 不透明渐变盖过 vibrancy。在窗口内容布局首帧或啥的时候,左侧 paint
StartupShell 浅灰,右侧未完成 vibrancy → 视觉割裂「左白右磨砂」。
修:StartupShell 容器改 background: transparent 让 vibrancy 全屏展开;
提示文字 + icon 用一个圆角 pill 卡片承载(rgba(255,255,255,0.55) +
backdrop-filter blur),跟 Capsule 视觉一致。
|
Codex usage limits have been reached for code reviews. Please check with the admins of this repo to increase the limits by adding credits. |
PR Reviewer Guide 🔍Here are some key observations to aid the review process:
|
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.
User description
用户反馈
启动时间较长时(凭据迁移 / 权限 probe / hotkey hook 还没 ready),main window 左侧出现白色矩形显示「OpenLess 正在启动」,本应是纯磨砂玻璃背景。
根因
main window 在 `tauri.conf.json` 是 `transparent: true` + `macOSPrivateApi: true`(NSVisualEffectView vibrancy)。但 `App.tsx::StartupShell` 之前用:
```tsx
background: linear-gradient(180deg, rgba(245,245,247,0.96), rgba(232,232,236,0.96))
```
96% 不透明渐变 → 盖过 vibrancy。在 'checking' phase 持续较长时(mac 端权限 probe / Windows 端 hotkey poll 10s 上限),左侧已 paint StartupShell 浅灰,右侧 vibrancy 区域看起来成了割裂的「白 + 磨砂」。
修复
```diff
```
让 vibrancy 全屏展开。提示文字 + icon 用一个圆角 pill 卡片承载(`rgba(255,255,255,0.55)` + `backdrop-filter: blur(20px) saturate(180%)`),跟 Capsule 视觉一致。
Test plan
PR Type
Bug fix
Description
将 StartupShell 背景改为透明,允许全屏磨砂 vibrancy 效果
用圆角卡片包裹提示文字与图标,带模糊和阴影
消除长启动时左侧白屏割裂问题
File Walkthrough
App.tsx
startup splash transparent background and pill cardopenless-all/app/src/App.tsx
StartupShell背景渐变(96% 不透明)为transparent,避免遮盖 macOS vibrancy 效果padding、borderRadius: 999、半透明白色背景、backdropFilter模糊与饱和度、阴影及细边框
WebkitBackdropFilter保证 Safari 兼容