From 69f2ee7c87d7e88677387b21992b211a8a653ef7 Mon Sep 17 00:00:00 2001 From: neon443 <69979447+neon443@users.noreply.github.com> Date: Thu, 3 Jul 2025 17:18:23 +0100 Subject: [PATCH] fix ansi picker having fucked up arrangements prettify ui on thememanager --- Config.xcconfig | 2 +- ShhShell/Views/Themes/AnsiPickerView.swift | 7 +++---- ShhShell/Views/Themes/ThemeManagerView.swift | 16 ++++++++++++++-- 3 files changed, 18 insertions(+), 7 deletions(-) diff --git a/Config.xcconfig b/Config.xcconfig index 86e974f..deb74ac 100644 --- a/Config.xcconfig +++ b/Config.xcconfig @@ -5,7 +5,7 @@ // Created by neon443 on 06/06/2025. // -VERSION = 1.3.1 +VERSION = 1.5 BUILD = 51 // Configuration settings file format documentation can be found at: diff --git a/ShhShell/Views/Themes/AnsiPickerView.swift b/ShhShell/Views/Themes/AnsiPickerView.swift index 90a3ce6..3f4f544 100644 --- a/ShhShell/Views/Themes/AnsiPickerView.swift +++ b/ShhShell/Views/Themes/AnsiPickerView.swift @@ -13,10 +13,10 @@ struct AnsiPickerView: View { var body: some View { GeometryReader { geo in VStack(spacing: 0) { - ForEach(1...2, id: \.self) { row in + ForEach(0...1, id: \.self) { row in HStack(spacing: 0) { ForEach(1...8, id: \.self) { col in - let index = (row * col)-1 + let index = (col+(row*8))-1 var isSelected: Bool { hostsManager.selectedAnsi == index } ZStack { Rectangle() @@ -37,9 +37,8 @@ struct AnsiPickerView: View { } } } - .clipShape(RoundedRectangle(cornerRadius: 15)) - .frame(width: 400, height: 100) } + .clipShape(RoundedRectangle(cornerRadius: 15)) } } diff --git a/ShhShell/Views/Themes/ThemeManagerView.swift b/ShhShell/Views/Themes/ThemeManagerView.swift index d90a76f..02617d1 100644 --- a/ShhShell/Views/Themes/ThemeManagerView.swift +++ b/ShhShell/Views/Themes/ThemeManagerView.swift @@ -34,11 +34,23 @@ struct ThemeManagerView: View { .ignoresSafeArea(.all) GeometryReader { geo in VStack { - AnsiPickerView(hostsManager: hostsManager) - let columns: Int = max(1, Int((geo.size.width - 2*spacing) / (minColWidth + spacing))) let layout = Array(repeating: grid, count: columns) ScrollView { + HStack { + Text("Accent Color") + .padding(.top) + .padding(.horizontal) + .font(.headline) + Spacer() + } + HStack { + AnsiPickerView(hostsManager: hostsManager) + .frame(width: 400, height: 100) + Spacer() + } + .padding(.horizontal) + if hostsManager.themes.isEmpty { VStack(alignment: .leading) { Image(systemName: "paintpalette")