[英]Swift ui macos menu bar list transparent
I have the following list appearing in the menu bar, but the list appears with a background, I would like it to be seen with a transparent background.我在菜单栏中显示了以下列表,但该列表带有背景,我希望它以透明背景显示。
Code:代码:
List(fetch.todos) { todo in
VStack(alignment: .leading, spacing: 0) {
Text(todo.title)
Text("\(todo.completed.description)")
.font(.system(size: 11))
.foregroundColor(Color.gray)
}
}
您可以将.listStyle(SidebarListStyle())
修饰符添加到您的List
视图,使其与系统的透明度相匹配。
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.