change animation on the recents expander/collapser

fontmanager respecs theme bg
move the colorscheme thing back
This commit is contained in:
neon443
2025-08-17 19:57:18 +01:00
parent 95fd3dfe07
commit 6c452b3961
4 changed files with 54 additions and 50 deletions

View File

@@ -27,6 +27,8 @@ struct ShhShellApp: App {
hostsManager: hostsManager, hostsManager: hostsManager,
keyManager: keyManager keyManager: keyManager
) )
.colorScheme(hostsManager.selectedTheme.background.luminance > 0.5 ? .light : .dark)
.tint(hostsManager.tint)
} }
} }
} }

View File

@@ -78,9 +78,6 @@ struct ContentView: View {
} }
.scrollContentBackground(.hidden) .scrollContentBackground(.hidden)
} }
.colorScheme(hostsManager.selectedTheme.background.luminance > 0.5 ? .light : .dark)
.tint(hostsManager.tint)
.navigationTitle("ShhShell") .navigationTitle("ShhShell")
.toolbar { .toolbar {
ToolbarItem(placement: .confirmationAction) { ToolbarItem(placement: .confirmationAction) {

View File

@@ -13,6 +13,9 @@ struct FontManagerView: View {
@State var testLine: String = "the lazy brown fox jumps over the lazy dog" @State var testLine: String = "the lazy brown fox jumps over the lazy dog"
var body: some View { var body: some View {
ZStack {
hostsManager.selectedTheme.background.suiColor.opacity(0.7)
.ignoresSafeArea(.all)
List { List {
VStack { VStack {
HStack { HStack {
@@ -66,6 +69,8 @@ struct FontManagerView: View {
} }
} }
} }
.scrollContentBackground(.hidden)
}
} }
#Preview { #Preview {

View File

@@ -54,7 +54,7 @@ struct RecentsView: View {
if historyCount+2 > hostsManager.history.count { if historyCount+2 > hostsManager.history.count {
increment = 1 increment = 1
} }
withAnimation { historyCount += increment } withAnimation(.spring) { historyCount += increment }
} label: { } label: {
Image(systemName: "chevron.down") Image(systemName: "chevron.down")
.resizable().scaledToFit() .resizable().scaledToFit()
@@ -76,7 +76,7 @@ struct RecentsView: View {
Spacer() Spacer()
Button { Button {
withAnimation { historyCount = 0 } withAnimation(.spring) { historyCount = 0 }
} label: { } label: {
Image(systemName: "chevron.up.2") Image(systemName: "chevron.up.2")
.resizable().scaledToFit() .resizable().scaledToFit()