mirror of
https://github.com/neon443/ShhShell.git
synced 2026-03-11 13:26:16 +00:00
fix ansi picker having fucked up arrangements
prettify ui on thememanager
This commit is contained in:
@@ -5,7 +5,7 @@
|
|||||||
// Created by neon443 on 06/06/2025.
|
// Created by neon443 on 06/06/2025.
|
||||||
//
|
//
|
||||||
|
|
||||||
VERSION = 1.3.1
|
VERSION = 1.5
|
||||||
BUILD = 51
|
BUILD = 51
|
||||||
|
|
||||||
// Configuration settings file format documentation can be found at:
|
// Configuration settings file format documentation can be found at:
|
||||||
|
|||||||
@@ -13,10 +13,10 @@ struct AnsiPickerView: View {
|
|||||||
var body: some View {
|
var body: some View {
|
||||||
GeometryReader { geo in
|
GeometryReader { geo in
|
||||||
VStack(spacing: 0) {
|
VStack(spacing: 0) {
|
||||||
ForEach(1...2, id: \.self) { row in
|
ForEach(0...1, id: \.self) { row in
|
||||||
HStack(spacing: 0) {
|
HStack(spacing: 0) {
|
||||||
ForEach(1...8, id: \.self) { col in
|
ForEach(1...8, id: \.self) { col in
|
||||||
let index = (row * col)-1
|
let index = (col+(row*8))-1
|
||||||
var isSelected: Bool { hostsManager.selectedAnsi == index }
|
var isSelected: Bool { hostsManager.selectedAnsi == index }
|
||||||
ZStack {
|
ZStack {
|
||||||
Rectangle()
|
Rectangle()
|
||||||
@@ -37,9 +37,8 @@ struct AnsiPickerView: View {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
.clipShape(RoundedRectangle(cornerRadius: 15))
|
|
||||||
.frame(width: 400, height: 100)
|
|
||||||
}
|
}
|
||||||
|
.clipShape(RoundedRectangle(cornerRadius: 15))
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@@ -34,11 +34,23 @@ struct ThemeManagerView: View {
|
|||||||
.ignoresSafeArea(.all)
|
.ignoresSafeArea(.all)
|
||||||
GeometryReader { geo in
|
GeometryReader { geo in
|
||||||
VStack {
|
VStack {
|
||||||
AnsiPickerView(hostsManager: hostsManager)
|
|
||||||
|
|
||||||
let columns: Int = max(1, Int((geo.size.width - 2*spacing) / (minColWidth + spacing)))
|
let columns: Int = max(1, Int((geo.size.width - 2*spacing) / (minColWidth + spacing)))
|
||||||
let layout = Array(repeating: grid, count: columns)
|
let layout = Array(repeating: grid, count: columns)
|
||||||
ScrollView {
|
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 {
|
if hostsManager.themes.isEmpty {
|
||||||
VStack(alignment: .leading) {
|
VStack(alignment: .leading) {
|
||||||
Image(systemName: "paintpalette")
|
Image(systemName: "paintpalette")
|
||||||
|
|||||||
Reference in New Issue
Block a user