From f0cc4613daf7cbdc82620356297ddac8b1268799 Mon Sep 17 00:00:00 2001 From: naturecodevoid <44983869+naturecodevoid@users.noreply.github.com> Date: Thu, 16 Feb 2023 17:57:19 -0800 Subject: [PATCH] AppIconsView: Add artists --- AltStore/Views/Settings/AppIconsView.swift | 16 +++++++++++++--- 1 file changed, 13 insertions(+), 3 deletions(-) diff --git a/AltStore/Views/Settings/AppIconsView.swift b/AltStore/Views/Settings/AppIconsView.swift index f3241593..356c635d 100644 --- a/AltStore/Views/Settings/AppIconsView.swift +++ b/AltStore/Views/Settings/AppIconsView.swift @@ -27,6 +27,11 @@ struct AppIconsView: View { SpecialIcon(assetName: "Starburst", suffix: "(Beta)", forceIndex: 1), SpecialIcon(assetName: "Steel", suffix: "(Nightly)", forceIndex: 2), ] + private let artists = [ + "Chris (LitRitt)": ["Neon", "Starburst", "Steel", "Storm"], + "naturecodevoid": ["Honeydew", "Midnight", "Sky"] + ] + private var icons: [Icon] = [] private var primaryIcon: Icon @@ -70,7 +75,6 @@ struct AppIconsView: View { var body: some View { List(icons, selection: $selectedIcon) { icon in - // FIXME: Button gives errors for some reason SwiftUI.Button(action: { selectedIconAssetName = icon.assetName // Pass nil for primary icon @@ -89,14 +93,20 @@ struct AppIconsView: View { .renderingMode(.original) .cornerRadius(12.6) // https://stackoverflow.com/a/10239376 .frame(width: 72, height: 72) - Text(icon.displayName) + VStack(alignment: .leading) { + Text(icon.displayName) + if let artist = artists.first(where: { $0.value.contains(icon.assetName) }) { + Text("By " + artist.key) + .foregroundColor(.gray) + } + } Spacer() if selectedIconAssetName == icon.assetName { Image(systemSymbol: .checkmark) .foregroundColor(Color.blue) } } - }.foregroundColor(Color.white) + }.foregroundColor(.primary) } .navigationTitle(L10n.AppIconsView.title) }