put the preview thing back into themebutton

This commit is contained in:
neon443 committed 2025-07-09 12:27:15 +01:00
1 parent 11e409cbaa
commit b98387ae92
1 file changed
+28 -1
+28 -1
View File
@@ -43,7 +43,34 @@ struct ThemeButton: View {
)
.padding(isSelected ? innerPadding : 0)
ThemePreview(theme: $theme, padding: padding, paletteR: paletteR)
VStack {
Text(theme.name)
.foregroundStyle(theme.foreground.suiColor)
.font(.headline)
.lineLimit(1)
Spacer()
VStack(spacing: 0) {
HStack(spacing: 0) {
ForEach(0..<8, id: \.self) { index in
Rectangle()
.aspectRatio(CGSize(width: 1, height: 1), contentMode: .fit)
.foregroundStyle(theme.ansi[index].suiColor)
}
}
HStack(spacing: 0) {
ForEach(8..<16, id: \.self) { index in
Rectangle()
.aspectRatio(CGSize(width: 1, height: 1), contentMode: .fit)
.foregroundStyle(theme.ansi[index].suiColor)
}
}
}
.clipShape(RoundedRectangle(cornerRadius: paletteR))
}
.padding(padding)
}
.onTapGesture {
hostsManager.selectTheme(theme)
Reference in new issue
Block a user
Blocking a user prevents them from interacting with repositories, such as opening or commenting on pull requests or issues. Learn more about blocking a user.