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.
问题
macOS 端使用
titleBarStyle: "Overlay"+hiddenTitle,网页内容铺满整个窗口;而前端唯一带data-tauri-drag-region的WindowTitlebar组件只在 Windows 渲染。结果是 macOS 上:改动
src/celemod-ui/src/components/WindowTitlebar.tsx:macOS 分支渲染一个 32px 高的空条并标记data-tauri-drag-region。拖动与双击缩放交给 Tauri 内置 drag 脚本处理(core:window:allow-start-dragging已在 capabilities 中;双击使用的internal_toggle_maximize包含在core:default内)。src/celemod-ui/src/index.scss:新增.macos-titlebar(32px,与tauri.macos.conf.json中trafficLightPosition的留白高度对应),并移除原来的html[data-platform="macos"] .app-shell { padding-top: 32px; }。几何布局不变,只是把预留留白从 padding 换成真实的 flex 子元素。验证
在真机 (MacBook Pro 16, MacOS 27 Beta 8) 上验证可以正常使用。
备注
双击缩放的动画期间,WebView 内容会出现旧画面拉伸/白边,这是 tao + WKWebView 的已知问题(tauri-apps/tauri#13898),与本次改动无关,上游修复见 tauri-apps/tao#1207。