Skip to content

Commit

Permalink
Updates to app colour scheme
Browse files Browse the repository at this point in the history
  • Loading branch information
lukebettridge committed Jul 8, 2021
1 parent 2a17133 commit 79bdc08
Show file tree
Hide file tree
Showing 38 changed files with 213 additions and 131 deletions.
6 changes: 4 additions & 2 deletions Pod.xcodeproj/project.pbxproj
Original file line number Diff line number Diff line change
Expand Up @@ -1111,13 +1111,14 @@
CURRENT_PROJECT_VERSION = 1;
DEVELOPMENT_ASSET_PATHS = "\"Pod/Preview Content\"";
DEVELOPMENT_TEAM = GPM4PVH4B9;
ENABLE_BITCODE = NO;
ENABLE_PREVIEWS = YES;
INFOPLIST_FILE = Pod/Info.plist;
LD_RUNPATH_SEARCH_PATHS = (
"$(inherited)",
"@executable_path/Frameworks",
);
MARKETING_VERSION = 1.5.4;
MARKETING_VERSION = 1.6;
PRODUCT_BUNDLE_IDENTIFIER = uk.co.lukebettridge.pod;
PRODUCT_NAME = "$(TARGET_NAME)";
PROVISIONING_PROFILE_SPECIFIER = "";
Expand All @@ -1139,13 +1140,14 @@
CURRENT_PROJECT_VERSION = 1;
DEVELOPMENT_ASSET_PATHS = "\"Pod/Preview Content\"";
DEVELOPMENT_TEAM = GPM4PVH4B9;
ENABLE_BITCODE = NO;
ENABLE_PREVIEWS = YES;
INFOPLIST_FILE = Pod/Info.plist;
LD_RUNPATH_SEARCH_PATHS = (
"$(inherited)",
"@executable_path/Frameworks",
);
MARKETING_VERSION = 1.5.4;
MARKETING_VERSION = 1.6;
PRODUCT_BUNDLE_IDENTIFIER = uk.co.lukebettridge.pod;
PRODUCT_NAME = "$(TARGET_NAME)";
PROVISIONING_PROFILE_SPECIFIER = "";
Expand Down
12 changes: 6 additions & 6 deletions Pod/Assets.xcassets/AccentColor.colorset/Contents.json
Original file line number Diff line number Diff line change
Expand Up @@ -5,9 +5,9 @@
"color-space" : "srgb",
"components" : {
"alpha" : "1.000",
"blue" : "0x9C",
"green" : "0xBD",
"red" : "0xD5"
"blue" : "0.584",
"green" : "0.680",
"red" : "0.776"
}
},
"idiom" : "universal"
Expand All @@ -23,9 +23,9 @@
"color-space" : "srgb",
"components" : {
"alpha" : "1.000",
"blue" : "0x87",
"green" : "0xAA",
"red" : "0xE6"
"blue" : "0.259",
"green" : "0.471",
"red" : "0.820"
}
},
"idiom" : "universal"
Expand Down
17 changes: 0 additions & 17 deletions Pod/Assets.xcassets/Color.colorset/Contents.json

This file was deleted.

38 changes: 38 additions & 0 deletions Pod/Assets.xcassets/PrimaryBackground.colorset/Contents.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,38 @@
{
"colors" : [
{
"color" : {
"color-space" : "srgb",
"components" : {
"alpha" : "1.000",
"blue" : "0.980",
"green" : "0.973",
"red" : "0.973"
}
},
"idiom" : "universal"
},
{
"appearances" : [
{
"appearance" : "luminosity",
"value" : "dark"
}
],
"color" : {
"color-space" : "srgb",
"components" : {
"alpha" : "1.000",
"blue" : "0.078",
"green" : "0.059",
"red" : "0.047"
}
},
"idiom" : "universal"
}
],
"info" : {
"author" : "xcode",
"version" : 1
}
}
38 changes: 38 additions & 0 deletions Pod/Assets.xcassets/SecondaryBackground.colorset/Contents.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,38 @@
{
"colors" : [
{
"color" : {
"color-space" : "srgb",
"components" : {
"alpha" : "1.000",
"blue" : "1.000",
"green" : "1.000",
"red" : "1.000"
}
},
"idiom" : "universal"
},
{
"appearances" : [
{
"appearance" : "luminosity",
"value" : "dark"
}
],
"color" : {
"color-space" : "srgb",
"components" : {
"alpha" : "1.000",
"blue" : "0.129",
"green" : "0.098",
"red" : "0.078"
}
},
"idiom" : "universal"
}
],
"info" : {
"author" : "xcode",
"version" : 1
}
}
23 changes: 13 additions & 10 deletions Pod/Views/Collection/Collection.swift
Original file line number Diff line number Diff line change
Expand Up @@ -22,9 +22,16 @@ struct Collection: View {
VStack {
if vm.isLoading {
ProgressView()
.frame(maxWidth: .infinity, maxHeight: .infinity)
} else if collectionItems.count > 0 {
ScrollView(.vertical) {
VStack(spacing: 10) {
VStack(spacing: 15) {
Text("You have \(collectionItems.reduce(0) { $0 + $1.quantity }) capsules in your collection.")
.font(.caption2)
.foregroundColor(.gray)
.padding(.top, -16)
.frame(maxWidth: .infinity, alignment: .leading)

Section(header: HStack {
Text("Favorites").font(.title2).fontWeight(.semibold)
Spacer()
Expand All @@ -51,23 +58,19 @@ struct Collection: View {
CollectionRow(collectionItem, pod: pod)
}
}

Text("You have \(collectionItems.reduce(0) { $0 + $1.quantity }) capsules in your collection.")
.font(.caption2)
.foregroundColor(.gray)
.padding(.top, 4)
}
.padding()
.padding(.bottom, 30)
}
.background(
Color(colorScheme == .dark ? UIColor.systemBackground : UIColor.secondarySystemBackground)
.edgesIgnoringSafeArea(.all)
)
} else {
CollectionEmpty()
.frame(maxWidth: .infinity, maxHeight: .infinity)
}
}
.background(
Color("PrimaryBackground")
.edgesIgnoringSafeArea(.all)
)
.navigationBarTitle("My Collection")
}
.onAppear {
Expand Down
14 changes: 6 additions & 8 deletions Pod/Views/Collection/CollectionRow.swift
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,7 @@ struct CollectionRow: View {
.resizable()
.background(pod.color)
.frame(width: 55, height: 55)
.clipShape(RoundedRectangle(cornerRadius: 10))
.clipShape(RoundedRectangle(cornerRadius: 12.5))

VStack(alignment: .leading) {
HStack(alignment: .center, spacing: 5) {
Expand Down Expand Up @@ -67,17 +67,15 @@ struct CollectionRow: View {
Spacer()

Image(systemName: "chevron.forward")
.font(Font.headline.weight(.light))
.foregroundColor(.gray)
.font(Font.subheadline.weight(.light))
.foregroundColor(.accentColor)
}
}
.padding(.horizontal, 13.5)
.padding(.vertical, 12)
.padding(.horizontal, 15)
.background(
RoundedRectangle(cornerRadius: 10)
.fill(
colorScheme == .dark ? Color(UIColor.secondarySystemBackground) : Color.white
)
RoundedRectangle(cornerRadius: 15)
.fill(Color("SecondaryBackground"))
)
.opacity(collectionItem.quantity > 0 ? 1 : 0.5)
.contextMenu {
Expand Down
8 changes: 3 additions & 5 deletions Pod/Views/Collection/Favourites/FavouritesEmpty.swift
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ struct FavouritesEmpty: View {
VStack(spacing: 5) {
Image(systemName: "star.fill")
.font(Font.system(size: 50).weight(.light))
.foregroundColor(Color(UIColor.systemGray5))
.foregroundColor(Color(UIColor.systemGray4))
.padding(.bottom, 5)
Text("You have no favorites")
.font(.headline)
Expand All @@ -30,10 +30,8 @@ struct FavouritesEmpty: View {
.padding(.top, 18.5)
.padding(.bottom, 21)
.background(
RoundedRectangle(cornerRadius: 10)
.fill(
colorScheme == .dark ? Color(UIColor.secondarySystemBackground) : Color.white
)
RoundedRectangle(cornerRadius: 15)
.fill(Color("SecondaryBackground"))
)
}
}
3 changes: 2 additions & 1 deletion Pod/Views/Collection/Favourites/FavouritesRow.swift
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@ struct FavouritesRow: View {
.resizable()
.background(pod.color)
.frame(width: 40, height: 40)
.clipShape(RoundedRectangle(cornerRadius: 6))
.clipShape(RoundedRectangle(cornerRadius: 8))
HStack(spacing: 5) {
Text((pod.name ?? "").uppercased())
.font(.custom("FSLucasPro-SemiBd", size: 16))
Expand All @@ -38,5 +38,6 @@ struct FavouritesRow: View {
}
}
.padding(.vertical, 2.5)
.listRowBackground(Color("SecondaryBackground"))
}
}
1 change: 1 addition & 0 deletions Pod/Views/Collection/Favourites/FavouritesView.swift
Original file line number Diff line number Diff line change
Expand Up @@ -22,6 +22,7 @@ struct FavouritesView: View {
}
}
}
.background(Color("PrimaryBackground").edgesIgnoringSafeArea(.all))
.navigationBarTitle("Edit Favorites", displayMode: .inline)
.navigationBarItems(
trailing: Button(action: exit) { Text("Done") }
Expand Down
8 changes: 4 additions & 4 deletions Pod/Views/ContentView.swift
Original file line number Diff line number Diff line change
Expand Up @@ -22,19 +22,19 @@ struct ContentView: View {
TabView {
Collection()
.tabItem {
Image(systemName: "person.crop.square.fill")
Image(systemName: "books.vertical.fill")
Text("Collection")
}
Explore()
.tabItem {
Image(systemName: "square.grid.2x2.fill")
Image(systemName: "mail.stack.fill")
Text("Explore")
}
Spacer()
Trends()
.tabItem {
Image(systemName: "chart.bar.fill")
Text("Trends")
Image(systemName: "clock.arrow.circlepath")
Text("History")
}
Settings()
.tabItem {
Expand Down
4 changes: 3 additions & 1 deletion Pod/Views/Explore/Browse/Browse.swift
Original file line number Diff line number Diff line change
Expand Up @@ -49,6 +49,7 @@ struct Browse: View {
VStack {
if vm.isLoading || browseVM.isLoading {
ProgressView()
.frame(maxWidth: .infinity, maxHeight: .infinity)
} else {
ScrollView(.vertical) {
VStack {
Expand Down Expand Up @@ -76,14 +77,15 @@ struct Browse: View {
}
}
}
.background(Color("PrimaryBackground").edgesIgnoringSafeArea(.all))
.navigationBarTitle(title)
.navigationBarItems(
trailing:
Button(action: {
vm.openSheet(.filter, filter: $filter)
}) {
Image(systemName: "line.horizontal.3.decrease.circle\(filter.active ? ".fill" : "")")
.font(.title2)
.font(.headline)
}
)
.introspectNavigationController { UINavigationController in
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,6 @@ struct FilterAvailableRow: View {
.font(.subheadline)
.foregroundColor(selected ? .white : colorScheme == .dark ? .primary : .gray)
.frame(width: 114, height: 40)
.background(selected ? Color.accentColor : Color(colorScheme == .dark ? UIColor.secondarySystemBackground : UIColor.systemBackground))
.background(selected ? Color.accentColor : Color("SecondaryBackground"))
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -31,6 +31,6 @@ struct FilterCupRow: View {
.padding(.top, 7)
.padding(.horizontal, 10)
.frame(width: 65, height: 60)
.background(selected ? Color.accentColor : Color(colorScheme == .dark ? UIColor.secondarySystemBackground : UIColor.systemBackground))
.background(selected ? Color.accentColor : Color("SecondaryBackground"))
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,6 @@ struct FilterDecaffeinatedRow: View {
.font(.subheadline)
.foregroundColor(selected ? .white : colorScheme == .dark ? .primary : .gray)
.frame(width: 114, height: 40)
.background(selected ? Color.accentColor : Color(colorScheme == .dark ? UIColor.secondarySystemBackground : UIColor.systemBackground))
.background(selected ? Color.accentColor : Color("SecondaryBackground"))
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -20,6 +20,6 @@ struct FilterIntensityRow: View {
.foregroundColor(selected ? .white : colorScheme == .dark ? .primary : .gray)
.opacity(disabled && !selected ? colorScheme == .dark ? 0.2 : 0.4 : 1)
.frame(width: 45, height: 45)
.background(selected ? Color.accentColor : Color(colorScheme == .dark ? UIColor.secondarySystemBackground : UIColor.systemBackground))
.background(selected ? Color.accentColor : Color("SecondaryBackground"))
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -20,6 +20,6 @@ struct FilterRatingRow: View {
.foregroundColor(selected ? .white : colorScheme == .dark ? .primary : .gray)
.opacity(disabled && !selected ? colorScheme == .dark ? 0.2 : 0.4 : 1)
.frame(width: 45, height: 45)
.background(selected ? Color.accentColor : Color(colorScheme == .dark ? UIColor.secondarySystemBackground : UIColor.systemBackground))
.background(selected ? Color.accentColor : Color("SecondaryBackground"))
}
}
2 changes: 1 addition & 1 deletion Pod/Views/Explore/Browse/Filter/FilterView.swift
Original file line number Diff line number Diff line change
Expand Up @@ -123,7 +123,7 @@ struct FilterView: View {
disabled: !isDirty
)
}
.background(Color(colorScheme == .dark ? UIColor.systemBackground : UIColor.secondarySystemBackground).edgesIgnoringSafeArea(.all))
.background(Color("PrimaryBackground").edgesIgnoringSafeArea(.all))
}
.navigationBarTitle("Filter")
}
Expand Down
Loading

0 comments on commit 79bdc08

Please sign in to comment.