适用于 macOS 的 Xcode 风格工具栏 SwiftUI

发布于 2025-01-15 09:39:17 字数 906 浏览 3 评论 0原文

我正在为一个名为 CodeEdit 的项目做出贡献,该项目旨在制作一个设计类似于 Xcode 的代码编辑器。在黑暗模式下,我无法使工具栏颜色与 Xcode 黑暗模式下的工具栏颜色相同,它在黑暗模式下始终为黑色。下面的视频显示了正在发生的事情。所有代码均位于 https://github.com/highjeans/CodeEdit 中。我查看了 使用 Swift UI 自定义 macOS 工具栏,但这不是我需要什么。我还查看了 SwiftUI macOS Xcode Style Toolbar 但这更多是类似于 Notes 的东西不是Xcode。

https://drive.google.com/file/d/185LQCeiVwSub8GIj19f6svUTHa7hsBCL/ view?usp=sharing

编辑:我得到了工作的颜色,我不知道如何更改选项卡栏下的白色背景: 工作工具栏颜色的图片< /a>

I am contributing to a project called CodeEdit, which is looking to make a code editor with a design similar to Xcode. In dark mode, I can't get the toolbar color to be the same as the toolbar in Xcode dark mode, it is always black in dark mode. The video below shows what is happening. All code is in https://github.com/highjeans/CodeEdit. I looked at Customizing the macOS toolbar with Swift UI but that is not what I need. I also looked at SwiftUI macOS Xcode Style Toolbar but that is more for something similar to Notes not Xcode.

https://drive.google.com/file/d/185LQCeiVwSub8GIj19f6svUTHa7hsBCL/view?usp=sharing

Edit: I got the color to work, I don't know how to change the white background under the Tab Bar: Picture of sort of working toolbar color

如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

扫码二维码加入Web技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。

评论(1

一身软味 2025-01-22 09:39:17

我通过改变有史以来最随机的线来让它工作。如果您正在寻找类似于 Xcode 的工具栏颜色,请将 NSWindow.titlebarSeparatorStyle 更改为 .line。

I got it working by changing the most random line ever. If you are looking for a toolbar color similar to Xcode, change NSWindow.titlebarSeparatorStyle to .line.

~没有更多了~
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文