redid icon picker ui

added applyscrollbacklenght with fallbacks
added blueprint icon variant
This commit is contained in:
neon443
2025-08-20 19:57:23 +01:00
parent 8fd10bb291
commit 590c101db8
3 changed files with 30 additions and 8 deletions

BIN
ShhShell Blueprint.pxd Normal file
View File

Binary file not shown.

View File

@@ -56,15 +56,26 @@ struct SettingsView: View {
Section("App Icon") { Section("App Icon") {
HStack { HStack {
ForEach(AppIcon.allCases, id: \.self) { icon in ForEach(AppIcon.allCases, id: \.self) { icon in
let isSelected = hostsManager.settings.appIcon == icon
ZStack {
RoundedRectangle(cornerRadius: 21.5)
.foregroundStyle(.gray.opacity(0.5))
.opacity(isSelected ? 1 : 0)
VStack(alignment: .center) { VStack(alignment: .center) {
icon.image icon.image
.resizable().scaledToFit() .resizable().scaledToFit()
.frame(maxWidth: 50) .frame(maxWidth: 85)
.clipShape(RoundedRectangle(cornerRadius: 11)) .clipShape(RoundedRectangle(cornerRadius: 16.5))
.padding(5)
Spacer(minLength: 10)
Text("\(icon)").tag(icon) Text("\(icon)").tag(icon)
.font(.caption)
.padding(5)
} }
}
.frame(maxWidth: 85)
.onTapGesture { .onTapGesture {
hostsManager.settings.appIcon = icon withAnimation { hostsManager.settings.appIcon = icon }
} }
} }
} }

View File

@@ -79,9 +79,20 @@ final class SSHTerminalDelegate: TerminalView, Sendable, @preconcurrency Termina
// TODO: selectedtext and cursor colors // TODO: selectedtext and cursor colors
} }
func applyScrollbackLength() {
guard let scrollback = hostsManager?.settings.scrollback else {
print("hey!")
print("scrollback not found, setting to 1,000")
getTerminal().options.scrollback = 1_000
return
}
getTerminal().options.scrollback = Int(scrollback)
print("set scrollback to \(Int(scrollback))")
}
public override init(frame: CGRect) { public override init(frame: CGRect) {
super.init(frame: frame) super.init(frame: frame)
getTerminal().options.scrollback = 10_0000 applyScrollbackLength()
terminalDelegate = self terminalDelegate = self
} }