Skip to content

Commit a515891

Browse files
committed
perf: Optimize color scheme
1 parent 7541a95 commit a515891

File tree

5 files changed

+27
-33
lines changed

5 files changed

+27
-33
lines changed

V2exOS/Assets.xcassets/ContentBackgroundColor.colorset/Contents.json

Lines changed: 2 additions & 25 deletions
Original file line numberDiff line numberDiff line change
@@ -2,31 +2,8 @@
22
"colors" : [
33
{
44
"color" : {
5-
"color-space" : "srgb",
6-
"components" : {
7-
"alpha" : "1.000",
8-
"blue" : "0.956",
9-
"green" : "0.966",
10-
"red" : "0.969"
11-
}
12-
},
13-
"idiom" : "universal"
14-
},
15-
{
16-
"appearances" : [
17-
{
18-
"appearance" : "luminosity",
19-
"value" : "dark"
20-
}
21-
],
22-
"color" : {
23-
"color-space" : "srgb",
24-
"components" : {
25-
"alpha" : "1.000",
26-
"blue" : "0.119",
27-
"green" : "0.158",
28-
"red" : "0.219"
29-
}
5+
"platform" : "osx",
6+
"reference" : "textBackgroundColor"
307
},
318
"idiom" : "universal"
329
}

V2exOS/Assets.xcassets/DividerColor.colorset/Contents.json

Lines changed: 18 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -9,6 +9,24 @@
99
}
1010
},
1111
"idiom" : "universal"
12+
},
13+
{
14+
"appearances" : [
15+
{
16+
"appearance" : "luminosity",
17+
"value" : "dark"
18+
}
19+
],
20+
"color" : {
21+
"color-space" : "srgb",
22+
"components" : {
23+
"alpha" : "1.000",
24+
"blue" : "0.243",
25+
"green" : "0.217",
26+
"red" : "0.228"
27+
}
28+
},
29+
"idiom" : "universal"
1230
}
1331
],
1432
"info" : {

V2exOS/Assets.xcassets/ListRowHighlightBackgroundColor.colorset/Contents.json

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -23,9 +23,9 @@
2323
"color-space" : "srgb",
2424
"components" : {
2525
"alpha" : "1.000",
26-
"blue" : "0.172",
27-
"green" : "0.210",
28-
"red" : "0.264"
26+
"blue" : "0.248",
27+
"green" : "0.223",
28+
"red" : "0.233"
2929
}
3030
},
3131
"idiom" : "universal"

V2exOS/Views/TopicDetail/TopicDetailView.swift

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -105,7 +105,6 @@ struct TopicDetailView: View {
105105
loadComments(page: 1)
106106
}
107107
#if os(macOS)
108-
.background(Color("ContentBackgroundColor"))
109108
.hiddeScrollContentBackground()
110109
#endif
111110
}

V2exOS/Views/TopicList/TopicListView.swift

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -29,7 +29,7 @@ struct TopicListView: View {
2929
}
3030

3131
var body: some View {
32-
NavigationView() {
32+
NavigationView {
3333
List {
3434
if let topics = topics {
3535
ForEach(topics) { topic in
@@ -45,7 +45,7 @@ struct TopicListView: View {
4545
} label: {
4646
TopicListCellView(topic: topic)
4747
}
48-
.listRowBackground(listRowBackgroundColor(topic).animation(.linear(duration: 0.05)))
48+
.listRowBackground(listRowBackgroundColor(topic))
4949
.padding(.horizontal, 8)
5050
.padding(.vertical, 4)
5151
#endif
@@ -83,8 +83,8 @@ struct TopicListView: View {
8383
.listStyle(.plain)
8484
.frame(minWidth: 400, idealWidth: 500)
8585
.foregroundColor(.black)
86-
.removeBackground()
87-
.background(Color("ContentBackgroundColor"))
86+
// .removeBackground()
87+
// .background(Color("ContentBackgroundColor"))
8888
.onFirstAppear {
8989
print("onFirstAppear....")
9090
Task {

0 commit comments

Comments
 (0)