Improve groups

This commit is contained in:
世界
2023-08-20 15:27:45 +08:00
parent dbd8700145
commit d3b2040fe1
6 changed files with 21 additions and 93 deletions
@@ -68,12 +68,23 @@ public struct GroupView: View {
ForEach(Array(itemGroups.enumerated()), id: \.offset) { items in
HStack(spacing: 5) {
ForEach(items.element, id: \.tag) { it in
Rectangle()
.fill(it.delayColor)
ZStack {
Rectangle()
.fill(it.delayColor)
if it.tag == group.selected {
Rectangle()
.fill(Color.white)
#if !os(tvOS)
.frame(width: 5, height: 5)
#else
.frame(width: 15, height: 15)
#endif
}
}
#if !os(tvOS)
.frame(width: 10, height: 10)
.frame(width: 10, height: 10)
#else
.frame(width: 30, height: 30)
.frame(width: 30, height: 30)
#endif
}
}.frame(maxWidth: .infinity, alignment: .topLeading)