mirror of
https://github.com/neon443/ShhShell.git
synced 2026-03-11 21:36:17 +00:00
added a lil shadow opposite to the color scheme to help tell if u selected white on white for example
added bottom padding to the thememanager, remove the top padding
This commit is contained in:
@@ -10,6 +10,8 @@ import SwiftUI
|
|||||||
struct AnsiPickerView: View {
|
struct AnsiPickerView: View {
|
||||||
@ObservedObject var hostsManager: HostsManager
|
@ObservedObject var hostsManager: HostsManager
|
||||||
|
|
||||||
|
@Environment(\.colorScheme) var colorScheme
|
||||||
|
|
||||||
var body: some View {
|
var body: some View {
|
||||||
ZStack(alignment: .center) {
|
ZStack(alignment: .center) {
|
||||||
RoundedRectangle(cornerRadius: 15)
|
RoundedRectangle(cornerRadius: 15)
|
||||||
@@ -26,6 +28,10 @@ struct AnsiPickerView: View {
|
|||||||
RoundedRectangle(cornerRadius: isSelected ? 5 : 0)
|
RoundedRectangle(cornerRadius: isSelected ? 5 : 0)
|
||||||
.fill(hostsManager.selectedTheme.ansi[index].suiColor)
|
.fill(hostsManager.selectedTheme.ansi[index].suiColor)
|
||||||
.padding(isSelected ? 5 : 0)
|
.padding(isSelected ? 5 : 0)
|
||||||
|
.shadow(
|
||||||
|
color: colorScheme == .dark ? .white : .black,
|
||||||
|
radius: isSelected ? 2 : 0
|
||||||
|
)
|
||||||
.onTapGesture {
|
.onTapGesture {
|
||||||
hostsManager.selectAnsi(index)
|
hostsManager.selectAnsi(index)
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -53,7 +53,6 @@ struct ThemeManagerView: View {
|
|||||||
|
|
||||||
HStack {
|
HStack {
|
||||||
Text("Your Themes")
|
Text("Your Themes")
|
||||||
.padding(.top)
|
|
||||||
.padding(.horizontal)
|
.padding(.horizontal)
|
||||||
.font(.headline)
|
.font(.headline)
|
||||||
Spacer()
|
Spacer()
|
||||||
@@ -94,6 +93,7 @@ struct ThemeManagerView: View {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
.padding(.horizontal)
|
.padding(.horizontal)
|
||||||
|
.padding(.bottom)
|
||||||
.animation(.default, value: hostsManager.themes)
|
.animation(.default, value: hostsManager.themes)
|
||||||
}
|
}
|
||||||
.navigationTitle("Themes")
|
.navigationTitle("Themes")
|
||||||
|
|||||||
Reference in New Issue
Block a user