fix(installer): Mac DMG 窗口拉大后背景延展铺满,不再露白边(dev-board#580) - #804
Merged
Conversation
Finder 按原尺寸把背景贴在左上角、图外涂白,窗口一拉大就露白。桌面端与 Office/WPS 插件端两个 DMG 的背景画布扩到 3840x2160(2x 7680x4320),设计主体 仍在左上 660x420 原位不动(改前改后裁切比对最大差 1/255),延展区延续同一套渐变与 绿带;桌面端显式写 dmg.window 660x420,否则 electron-builder 拿背景尺寸当窗口尺寸。 实测(真 DMG + Finder osascript 拉到 1600x962 + screencapture 数白像素): 桌面 78.9% → 0.52%,插件 79.4% → 1.0%(剩余是图标光晕本身);默认窗口数值不变。 DMG 体积各约 +1.5MB。 Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
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 subscribe to this conversation on GitHub.
Already have an account?
Sign in.
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.
问题
dev-board#580:Mac DMG 安装窗口被拖大后,背景图不跟随,右侧和下方露出大片白边。
根因
Finder 按背景图原尺寸贴在窗口左上角,不拉伸不平铺,图外一律涂白。原背景只有 660x420。
修法
desktop/build/dmg-background.html与插件端office-addin/installer/art/dmg-background.html:画布扩到 3840x2160(覆盖 4K「更多空间」),渐变改用 px 定位让左上 660x420 主体原位不动,绿带与走线横向延续;四张 PNG 重新渲染入库。desktop/package.json显式写dmg.window: 660x420(electron-builder 默认拿背景尺寸当窗口尺寸)。render-art.mjs渲染尺寸同步;eng-infra.md记一笔。验证
screencapture -R数内容区纯白像素:未验证
🤖 Generated with Claude Code