diff --git a/Feels.xcodeproj/project.xcworkspace/xcshareddata/swiftpm/Package.resolved b/Feels.xcodeproj/project.xcworkspace/xcshareddata/swiftpm/Package.resolved index 6a10697..c705fc2 100644 --- a/Feels.xcodeproj/project.xcworkspace/xcshareddata/swiftpm/Package.resolved +++ b/Feels.xcodeproj/project.xcworkspace/xcshareddata/swiftpm/Package.resolved @@ -6,7 +6,7 @@ "repositoryURL": "https://github.com/akatreyt/ChartsPackage", "state": { "branch": "master", - "revision": "e55fef3e8c294d5c2b25014d6d0734760b3ca6fa", + "revision": "ab1aa4f8ade9540e9d2f19f7cb8b8e6ac0c2a8fd", "version": null } }, diff --git a/Shared/Models/Theme.swift b/Shared/Models/Theme.swift index 4d65da6..23c5673 100644 --- a/Shared/Models/Theme.swift +++ b/Shared/Models/Theme.swift @@ -48,12 +48,17 @@ enum Theme: Int, CaseIterable { protocol Themeable { static var title: String { get } var secondaryBGColor: Color { get } + var bgColor: Color { get } var bg: AnyView { get } var preview: AnyView { get } var labelColor: Color { get } } struct IFeelTheme: Themeable { + var bgColor: Color { + return Color(uiColor: UIColor.systemBackground) + } + var labelColor: Color { return Color(uiColor: UIColor.label) } @@ -63,7 +68,7 @@ struct IFeelTheme: Themeable { } var secondaryBGColor: Color { - return Color(uiColor: UIColor.systemBackground) + return Color(uiColor: UIColor.secondarySystemBackground) } var bg: AnyView { @@ -84,6 +89,10 @@ struct IFeelTheme: Themeable { } struct SystemTheme: Themeable { + var bgColor: Color { + return Color(uiColor: UIColor.systemBackground) + } + var labelColor: Color { return Color(uiColor: UIColor.label) } @@ -118,6 +127,10 @@ struct SystemTheme: Themeable { } struct AlwaysDark: Themeable { + var bgColor: Color { + return Color(uiColor: UIColor.systemBackground.resolvedColor(with: .init(userInterfaceStyle: .dark))) + } + var labelColor: Color { return .white } @@ -152,6 +165,10 @@ struct AlwaysDark: Themeable { } struct AlwaysLight: Themeable { + var bgColor: Color { + return Color(uiColor: UIColor.systemBackground) + } + var labelColor: Color { return .black } diff --git a/Shared/views/CustomizeView/CustomizeView.swift b/Shared/views/CustomizeView/CustomizeView.swift index 573abc4..bfd8150 100644 --- a/Shared/views/CustomizeView/CustomizeView.swift +++ b/Shared/views/CustomizeView/CustomizeView.swift @@ -61,31 +61,37 @@ struct CustomizeView: View { Text(String(localized: "settings_view_change_icon")) .font(.body) .foregroundColor(theme.currentTheme.labelColor) + .padding(.top) - HStack { - Button(action: { - UIApplication.shared.setAlternateIconName(nil) - }, label: { - Image("FeelsAppIcon", bundle: .main) - .resizable() - .frame(width: 50, height:50) - .cornerRadius(10) - }) - - ForEach(iconSets, id: \.self.0){ iconSet in + ScrollView(.horizontal) { + HStack { Button(action: { - UIApplication.shared.setAlternateIconName(iconSet.1) { (error) in - // FIXME: Handle error - } + UIApplication.shared.setAlternateIconName(nil) }, label: { - Image(iconSet.0, bundle: .main) + Image("FeelsAppIcon", bundle: .main) .resizable() .frame(width: 50, height:50) .cornerRadius(10) }) + + ForEach(iconSets, id: \.self.0){ iconSet in + Button(action: { + UIApplication.shared.setAlternateIconName(iconSet.1) { (error) in + // FIXME: Handle error + } + }, label: { + Image(iconSet.0, bundle: .main) + .resizable() + .frame(width: 50, height:50) + .cornerRadius(10) + }) + } } + .padding() } + .background(RoundedRectangle(cornerRadius: 10).fill().foregroundColor(theme.currentTheme.bgColor)) .padding() + .cornerRadius(10) } } .fixedSize(horizontal: false, vertical: true) @@ -137,7 +143,7 @@ struct CustomizeView: View { selectedWidget.fuckingWrapped = CustomWidgetModel.randomWidget selectedWidget.showFuckingSheet = true } - .padding() + .padding(.top) ScrollView(.horizontal) { HStack { ForEach(UserDefaultsStore.getCustomWidgets(), id: \.uuid) { widget in @@ -149,9 +155,13 @@ struct CustomizeView: View { selectedWidget.showFuckingSheet = true } } + } .padding() } + .background(RoundedRectangle(cornerRadius: 10).fill().foregroundColor(theme.currentTheme.bgColor)) + .padding() + .cornerRadius(10) } } .fixedSize(horizontal: false, vertical: true) diff --git a/Shared/views/HomeView/HomeViewTwo/HomeViewTwo.swift b/Shared/views/HomeView/HomeViewTwo/HomeViewTwo.swift index a331a55..33ae0b9 100644 --- a/Shared/views/HomeView/HomeViewTwo/HomeViewTwo.swift +++ b/Shared/views/HomeView/HomeViewTwo/HomeViewTwo.swift @@ -152,6 +152,7 @@ extension HomeViewTwo { } } } + .contentShape(Rectangle()) .onTapGesture{ let deailView = MonthDetailView(monthInt: month, yearInt: year,