Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix color warning #64

Merged
merged 1 commit into from
Jun 11, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 0 additions & 4 deletions Exercism.xcodeproj/project.pbxproj
Original file line number Diff line number Diff line change
Expand Up @@ -47,7 +47,6 @@
FD73E10F29C451E8001B59D3 /* Fetcher.swift in Sources */ = {isa = PBXBuildFile; fileRef = FD73E10E29C451E8001B59D3 /* Fetcher.swift */; };
FD79A4ED2A8CCF3900250711 /* CustomTabView.swift in Sources */ = {isa = PBXBuildFile; fileRef = FD79A4EC2A8CCF3900250711 /* CustomTabView.swift */; };
FD7DC53029E0B00700A1EBD9 /* PreviewData.swift in Sources */ = {isa = PBXBuildFile; fileRef = FD7DC52F29E0B00700A1EBD9 /* PreviewData.swift */; };
FD7DC53329E0B03600A1EBD9 /* ColorExt.swift in Sources */ = {isa = PBXBuildFile; fileRef = FD7DC53129E0B03600A1EBD9 /* ColorExt.swift */; };
FD7DC53429E0B03600A1EBD9 /* TestRunExt.swift in Sources */ = {isa = PBXBuildFile; fileRef = FD7DC53229E0B03600A1EBD9 /* TestRunExt.swift */; };
FD7DC53529E0B0E900A1EBD9 /* FilterView.swift in Sources */ = {isa = PBXBuildFile; fileRef = FD0B071128F5F77300FCA956 /* FilterView.swift */; };
FD7DC53929E2CA6700A1EBD9 /* AsyncResultView.swift in Sources */ = {isa = PBXBuildFile; fileRef = FD7DC53829E2CA6700A1EBD9 /* AsyncResultView.swift */; };
Expand Down Expand Up @@ -115,7 +114,6 @@
FD73E10E29C451E8001B59D3 /* Fetcher.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = Fetcher.swift; sourceTree = "<group>"; };
FD79A4EC2A8CCF3900250711 /* CustomTabView.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = CustomTabView.swift; sourceTree = "<group>"; };
FD7DC52F29E0B00700A1EBD9 /* PreviewData.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = PreviewData.swift; sourceTree = "<group>"; };
FD7DC53129E0B03600A1EBD9 /* ColorExt.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = ColorExt.swift; sourceTree = "<group>"; };
FD7DC53229E0B03600A1EBD9 /* TestRunExt.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = TestRunExt.swift; sourceTree = "<group>"; };
FD7DC53829E2CA6700A1EBD9 /* AsyncResultView.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = AsyncResultView.swift; sourceTree = "<group>"; };
FD9262FB28F6DAE700C9476C /* FilterTableView.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = FilterTableView.swift; sourceTree = "<group>"; };
Expand Down Expand Up @@ -298,7 +296,6 @@
isa = PBXGroup;
children = (
FD26AE4228DCC9C100DC902B /* ExercismTextField.swift */,
FD7DC53129E0B03600A1EBD9 /* ColorExt.swift */,
FD7DC53229E0B03600A1EBD9 /* TestRunExt.swift */,
FD4A77642987E18E00E29436 /* RoundedView.swift */,
FD3F2B132AA750D300ADB248 /* ExercismButton.swift */,
Expand Down Expand Up @@ -436,7 +433,6 @@
isa = PBXSourcesBuildPhase;
buildActionMask = 2147483647;
files = (
FD7DC53329E0B03600A1EBD9 /* ColorExt.swift in Sources */,
FDE4EBFC2A4B009C007ED19E /* EmptyStateView.swift in Sources */,
FDE27F26298FC5CE00F61A0A /* ProfileTableView.swift in Sources */,
FD3F2B142AA750D300ADB248 /* ExercismButton.swift in Sources */,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@
"location" : "https://github.com/apps-fab/Highlightr.git",
"state" : {
"branch" : "master",
"revision" : "7532ec7bba13ed42c22f9b51445429f209c88263"
"revision" : "31aba666f32792b58a164431485c59b90c04a947"
}
},
{
Expand All @@ -34,7 +34,7 @@
"location" : "https://github.com/evgenyneu/keychain-swift.git",
"state" : {
"branch" : "master",
"revision" : "d0ef1ecaabcb01bc5c3d10b685cd9fcc0f1d7fd3"
"revision" : "5e1b02b6a9dac2a759a1d5dbc175c86bd192a608"
}
},
{
Expand All @@ -43,7 +43,7 @@
"location" : "https://github.com/SDWebImage/SDWebImage.git",
"state" : {
"branch" : "master",
"revision" : "f6afa0132961d593f07970d84e2d8b588c29ea04"
"revision" : "b5cbc33fb2307d9a407a9c45c333b409c69651ef"
}
},
{
Expand All @@ -61,7 +61,7 @@
"location" : "https://github.com/SDWebImage/SDWebImageSwiftUI.git",
"state" : {
"branch" : "master",
"revision" : "22423b017b99ab8ac44e29e6372f571f782af6e4"
"revision" : "b7af5e6bd9c2987e41730400d1baad13d74a141a"
}
},
{
Expand All @@ -70,7 +70,7 @@
"location" : "https://github.com/sindresorhus/Settings",
"state" : {
"branch" : "main",
"revision" : "2f4f65eed252198be383aa0d9058bbaf8f740aa5"
"revision" : "879ea83a7bbc6dbebf62bed8c547f090146372a6"
}
},
{
Expand Down
2 changes: 1 addition & 1 deletion Exercism/Authentication/LoginView.swift
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@ struct LoginView: View {
leftView
.frame(width: geometry.size.width * 0.62,
height: geometry.size.height)
.background(Color.exercismPurple)
.background(Color.appPurple)
rightView
.frame(maxWidth: .infinity)
.frame(height: geometry.size.height)
Expand Down
19 changes: 0 additions & 19 deletions Exercism/Common/ColorExt.swift

This file was deleted.

2 changes: 1 addition & 1 deletion Exercism/Common/ExercismButton.swift
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ import SwiftUI

struct ExercismButton: View {
let title: String
let backgroundColor = Color.exercismPurple
let backgroundColor = Color.appPurple
@Binding var isLoading: Bool
let action: () -> Void

Expand Down
2 changes: 1 addition & 1 deletion Exercism/ExerciseList/CustomPicker.swift
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@ struct CustomPicker<Content: View, Selection: Identifiable&Equatable>: View {
.minimumScaleFactor(0.9)
.padding()
.frame(height: 34)
.roundEdges(backgroundColor: item == selection ? Color.exercismPurple.opacity(0.15) : .clear, lineColor: .clear, cornerRadius: 25)
.roundEdges(backgroundColor: item == selection ? Color.appPurple.opacity(0.15) : .clear, lineColor: .clear, cornerRadius: 25)
.contentShape(Rectangle())
.onTapGesture {
selection = item
Expand Down
8 changes: 4 additions & 4 deletions Exercism/ExerciseList/ExerciseGridView.swift
Original file line number Diff line number Diff line change
Expand Up @@ -37,13 +37,13 @@ struct ExerciseGridView: View {
.frame(height: 120)
.padding(5)
.roundEdges(
backgroundColor: Color.exercismDarkBackground,
backgroundColor: Color.appDarkBackground,
lineColor: isHover ? .purple : .clear,
borderWidth: 1.5,
cornerRadius: 12
)
.shadow(color: .offBlackShadow, radius: 15, x: 10, y: 10)
.shadow(color: .offWhiteShadow, radius: 15, x: -10, y: -10)
.shadow(color: Color.appOffBlackShadow, radius: 15, x: 10, y: 10)
.shadow(color: Color.appOffWhiteShadow, radius: 15, x: -10, y: -10)
.padding()
.scaleEffect(isHover ? 1.05 : 1)
.onHover { hover in
Expand Down Expand Up @@ -119,7 +119,7 @@ struct ExerciseGridView: View {
}
.roundEdges(
backgroundColor: Color.green.opacity(0.2),
lineColor: Color.exercismDarkBackground
lineColor: Color.appDarkBackground
)
.font(.callout.weight(.semibold))
}
Expand Down
2 changes: 1 addition & 1 deletion Exercism/ExerciseList/ExercisesList.swift
Original file line number Diff line number Diff line change
Expand Up @@ -87,7 +87,7 @@ struct ExercisesList: View {
}
}
.padding()
.background(Color.exercismDarkBackground)
.background(Color.appDarkBackground)

Divider()

Expand Down
6 changes: 3 additions & 3 deletions Exercism/Exercises/ExerciseRightSidebarView.swift
Original file line number Diff line number Diff line change
Expand Up @@ -54,7 +54,7 @@ struct ExerciseRightSidebarView: View {
}
.frame(maxWidth: .infinity)
.frame(height: 45)
.background(Color.exercismPurple, in: .rect(cornerRadius: 15))
.background(Color.appPurple, in: .rect(cornerRadius: 15))
.foregroundStyle(.white)
}
.buttonStyle(.plain)
Expand Down Expand Up @@ -105,7 +105,7 @@ struct ExerciseRightSidebarView: View {
.fill(Color.secondary)
.frame(width: 1)
}
.background(Color.exercismPrimaryBackground)
.background(Color.appPrimaryBackground)
})
.markdownCodeSyntaxHighlighter(.splash(theme: theme, language: language))
.markdownTheme(markdownTheme)
Expand Down Expand Up @@ -145,7 +145,7 @@ struct ExerciseRightSidebarView: View {
var body: some View {
VStack {
ProgressView(Strings.runningTests.localized(), value: progress, total: 100)
.tint(.exercismPurple)
.tint(Color.appPurple)
.padding()
.onReceive(timer) { _ in
if progress < 100 {
Expand Down
4 changes: 2 additions & 2 deletions Exercism/Exercises/SubmitSolutionContentView.swift
Original file line number Diff line number Diff line change
Expand Up @@ -124,7 +124,7 @@ struct SubmitSolutionContentView: View {
.frame(width: 100, height: 30)
.roundEdges(
backgroundColor: Color.gray.opacity(0.25),
lineColor: .exercismPurple,
lineColor: Color.appPurple,
cornerRadius: 10)
}
.buttonStyle(.plain)
Expand All @@ -149,7 +149,7 @@ struct SubmitSolutionContentView: View {
}
.foregroundStyle(.white)
.frame(width: 100, height: 30)
.roundEdges(backgroundColor: Color.exercismPurple, lineColor: .clear, cornerRadius: 10)
.roundEdges(backgroundColor: Color.appPurple, lineColor: .clear, cornerRadius: 10)
}
.buttonStyle(.plain)
.disabled(isSubmitting)
Expand Down
4 changes: 2 additions & 2 deletions Exercism/Exercises/TestRunResultView.swift
Original file line number Diff line number Diff line change
Expand Up @@ -50,7 +50,7 @@ struct TestRunResultView: View {
Image.play
}
.padding(4)
.roundEdges(backgroundColor: Color.exercismPurple)
.roundEdges(backgroundColor: Color.appPurple)
}
.buttonStyle(.plain)
}
Expand Down Expand Up @@ -139,7 +139,7 @@ struct TestRunResultView: View {
.fontWeight(.bold)
.textCase(.uppercase)
.textFieldStyle(.roundedBorder)
.background(group.passed(taskId: task.id) ? Color.green : Color.lightGold)
.background(group.passed(taskId: task.id) ? Color.green : Color.appLightGold)
.foregroundColor(Color.white)
Text(task.title)
.fontWeight(.semibold)
Expand Down
2 changes: 1 addition & 1 deletion Exercism/Tracks/FilterView.swift
Original file line number Diff line number Diff line change
Expand Up @@ -63,7 +63,7 @@ struct FilterView: View {
.lineLimit(1)
.padding(8)
.roundEdges(
backgroundColor: Color.exercismPurple.opacity(0.2),
backgroundColor: Color.appPurple.opacity(0.2),
lineColor: .clear,
cornerRadius: 8
)
Expand Down
6 changes: 3 additions & 3 deletions Exercism/Tracks/TrackGridView.swift
Original file line number Diff line number Diff line change
Expand Up @@ -30,12 +30,12 @@ struct TrackGridView: View {
.frame(idealWidth: 450, maxWidth: .infinity, alignment: .leading)
.frame(height: 150)
.roundEdges(
backgroundColor: Color.exercismDarkBackground,
backgroundColor: Color.appDarkBackground,
lineColor: isHover ? .purple : .clear,
cornerRadius: 15
)
.shadow(color: .offBlackShadow, radius: 15, x: 10, y: 10)
.shadow(color: .offWhiteShadow, radius: 15, x: -10, y: -10)
.shadow(color: Color.appOffBlackShadow, radius: 15, x: 10, y: 10)
.shadow(color: Color.appOffWhiteShadow, radius: 15, x: -10, y: -10)
.padding()
.scaleEffect(isHover ? 1.05 : 1)
.onHover { hover in
Expand Down
2 changes: 1 addition & 1 deletion Exercism/Tracks/TracksListView.swift
Original file line number Diff line number Diff line change
Expand Up @@ -71,7 +71,7 @@ struct TracksListView: View {
.frame(maxWidth: .infinity)
}
.frame(maxWidth: .infinity)
.background(Color.exercismDarkBackground)
.background(Color.appDarkBackground)

ScrollView {
if tracks.isEmpty {
Expand Down
38 changes: 38 additions & 0 deletions Exercism/Util/Color.xcassets/appLightGold.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",
"green" : "72",
"red" : "117"
}
},
"idiom" : "universal"
},
{
"appearances" : [
{
"appearance" : "luminosity",
"value" : "dark"
}
],
"color" : {
"color-space" : "srgb",
"components" : {
"alpha" : "1.000",
"blue" : "1.000",
"green" : "1.000",
"red" : "1.000"
}
},
"idiom" : "universal"
}
],
"info" : {
"author" : "xcode",
"version" : 1
}
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,38 @@
{
"colors" : [
{
"color" : {
"color-space" : "srgb",
"components" : {
"alpha" : "1.000",
"blue" : "190",
"green" : "190",
"red" : "190"
}
},
"idiom" : "universal"
},
{
"appearances" : [
{
"appearance" : "luminosity",
"value" : "dark"
}
],
"color" : {
"color-space" : "srgb",
"components" : {
"alpha" : "1.000",
"blue" : "50",
"green" : "50",
"red" : "50"
}
},
"idiom" : "universal"
}
],
"info" : {
"author" : "xcode",
"version" : 1
}
}
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",
"green" : "1",
"red" : "1"
}
},
"idiom" : "universal"
},
{
"appearances" : [
{
"appearance" : "luminosity",
"value" : "dark"
}
],
"color" : {
"color-space" : "srgb",
"components" : {
"alpha" : "1.000",
"blue" : "25",
"green" : "25",
"red" : "25"
}
},
"idiom" : "universal"
}
],
"info" : {
"author" : "xcode",
"version" : 1
}
}