ios: fix search color in simplex dark theme (#4611)

* ios: fix search color in simplex dark theme

* paddings, colors, group icon

---------

Co-authored-by: Evgeny Poberezkin <evgeny@poberezkin.com>
This commit is contained in:
spaced4ndy
2024-08-08 01:39:05 +04:00
committed by GitHub
parent d0c52e43a2
commit dc713268e8
2 changed files with 13 additions and 11 deletions
@@ -112,7 +112,7 @@ struct NewChatSheet: View {
.modifier(ThemedBackground(grouped: true))
.navigationBarTitleDisplayMode(.large)
} label: {
Label("Create group", systemImage: "person.2")
Label("Create group", systemImage: "person.2.circle.fill")
}
}
@@ -142,7 +142,10 @@ struct NewChatSheet: View {
func newChatActionButton<Content : View>(_ icon: String, color: Color/* = .secondary*/, content: @escaping () -> Content) -> some View {
ZStack(alignment: .leading) {
Image(systemName: icon).frame(maxWidth: 24, maxHeight: 24, alignment: .center)
Image(systemName: icon)
.resizable()
.scaledToFit()
.frame(maxWidth: 24, maxHeight: 24, alignment: .center)
.symbolRenderingMode(.monochrome)
.foregroundColor(color)
content().foregroundColor(theme.colors.onBackground).padding(.leading, indent)
@@ -340,7 +343,7 @@ struct ContactsListSearchBar: View {
}
.padding(EdgeInsets(top: 7, leading: 7, bottom: 7, trailing: 7))
.foregroundColor(theme.colors.secondary)
.background(theme.colors.isLight ? theme.colors.background : theme.colors.secondaryVariant)
.background(Color(uiColor: .secondarySystemGroupedBackground))
.cornerRadius(10.0)
if searchFocussed {
@@ -354,6 +357,7 @@ struct ContactsListSearchBar: View {
toggleFilterButton()
}
}
.padding(.top, 24)
.onChange(of: searchFocussed) { sf in
withAnimation { searchMode = sf }
}
@@ -447,8 +451,8 @@ struct DeletedChats: View {
showDeletedChatIcon: false
)
}
.navigationTitle("Deleted chats")
.navigationBarTitleDisplayMode(.inline)
.navigationTitle("Archived contacts")
.navigationBarTitleDisplayMode(.large)
.navigationBarHidden(searchMode)
.modifier(ThemedBackground(grouped: true))
@@ -250,7 +250,6 @@ private fun NewChatSheetLayout(
icon = it.first,
text = it.second,
click = it.third,
extraPadding = true,
)
}
}
@@ -283,7 +282,7 @@ private fun NewChatSheetLayout(
contentDescription = stringResource(MR.strings.deleted_chats),
tint = MaterialTheme.colors.secondary,
)
TextIconSpaced(extraPadding = true)
TextIconSpaced(false)
Text(text = stringResource(MR.strings.deleted_chats), color = MaterialTheme.colors.onBackground)
}
}
@@ -330,14 +329,13 @@ private fun NewChatButton(
text: String,
click: () -> Unit,
textColor: Color = Color.Unspecified,
iconColor: Color = MaterialTheme.colors.secondary,
disabled: Boolean = false,
extraPadding: Boolean = false,
iconColor: Color = MaterialTheme.colors.primary,
disabled: Boolean = false
) {
SectionItemView(click, disabled = disabled) {
Row {
Icon(icon, text, tint = if (disabled) MaterialTheme.colors.secondary else iconColor)
TextIconSpaced(extraPadding)
TextIconSpaced(false)
Text(text, color = if (disabled) MaterialTheme.colors.secondary else textColor)
}
}