From b98387ae92b9e8283595b5d2ec1efebe00fe1a7f Mon Sep 17 00:00:00 2001 From: neon443 <69979447+neon443@users.noreply.github.com> Date: Wed, 9 Jul 2025 12:27:15 +0100 Subject: [PATCH] put the preview thing back into themebutton --- ShhShell/Views/Themes/ThemeButton.swift | 29 ++++++++++++++++++++++++- 1 file changed, 28 insertions(+), 1 deletion(-) diff --git a/ShhShell/Views/Themes/ThemeButton.swift b/ShhShell/Views/Themes/ThemeButton.swift index d5d6232..bbe17b6 100644 --- a/ShhShell/Views/Themes/ThemeButton.swift +++ b/ShhShell/Views/Themes/ThemeButton.swift @@ -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)