Skip to content

Commit ea09a55

Browse files
committed
Update ConsoleToolbarView design
1 parent bd8954e commit ea09a55

File tree

4 files changed

+21
-24
lines changed

4 files changed

+21
-24
lines changed

Demo/Sources/iOS/Assets.xcassets/AccentColor.colorset/Contents.json

Lines changed: 4 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -2,13 +2,8 @@
22
"colors" : [
33
{
44
"color" : {
5-
"color-space" : "srgb",
6-
"components" : {
7-
"alpha" : "1.000",
8-
"blue" : "0.839",
9-
"green" : "0.337",
10-
"red" : "0.345"
11-
}
5+
"platform" : "osx",
6+
"reference" : "systemBlueColor"
127
},
138
"idiom" : "universal"
149
},
@@ -20,13 +15,8 @@
2015
}
2116
],
2217
"color" : {
23-
"color-space" : "srgb",
24-
"components" : {
25-
"alpha" : "1.000",
26-
"blue" : "0.902",
27-
"green" : "0.361",
28-
"red" : "0.369"
29-
}
18+
"platform" : "osx",
19+
"reference" : "systemBlueColor"
3020
},
3121
"idiom" : "universal"
3222
}

Sources/PulseUI/Features/Console/List/ConsoleListContentView.swift

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -31,6 +31,9 @@ struct ConsoleListContentView: View {
3131
#if os(iOS) || os(visionOS)
3232
.onAppear { viewModel.onAppearCell(with: objectID) }
3333
.onDisappear { viewModel.onDisappearCell(with: objectID) }
34+
#endif
35+
#if os(iOS)
36+
.listRowInsets(EdgeInsets(top: 10, leading: 20, bottom: 10, trailing: 16))
3437
#endif
3538
}
3639
}

Sources/PulseUI/Features/Console/Views/ConsoleTaskCell.swift

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -39,7 +39,7 @@ struct ConsoleTaskCell: View {
3939
}
4040
.overlay(alignment: .leading) {
4141
StatusIndicatorView(state: task.state(in: store))
42-
.offset(x: -14)
42+
.offset(x: -15)
4343
}
4444
.overlay(alignment: .trailing) {
4545
if isDisclosureNeeded {
@@ -161,7 +161,7 @@ private struct StatusIndicatorView: View {
161161
var body: some View {
162162
Image(systemName: "circle.fill")
163163
.foregroundStyle(color)
164-
.font(.system(size: 8))
164+
.font(.system(size: 10))
165165
.clipShape(RoundedRectangle(cornerRadius: 3))
166166
}
167167

Sources/PulseUI/Features/Console/Views/ConsoleToolbarView.swift

Lines changed: 12 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -26,7 +26,7 @@ struct ConsoleToolbarView: View {
2626
}
2727

2828
private var horizontal: some View {
29-
HStack(alignment: .bottom, spacing: 0) {
29+
HStack(alignment: .center, spacing: 0) {
3030
contents(isVertical: false)
3131
}
3232
.buttonStyle(.plain)
@@ -70,7 +70,7 @@ struct ConsoleModePicker: View {
7070
}
7171

7272
var body: some View {
73-
HStack(spacing: 12) {
73+
HStack(spacing: 7) {
7474
ConsoleModeButton(title: "Network", details: CountFormatter.string(from: tasksCounter.count), isSelected: environment.mode == .network) {
7575
environment.mode = .network
7676
}
@@ -108,20 +108,24 @@ struct ConsoleModeButton: View {
108108

109109
var body: some View {
110110
Button(action: action) {
111-
HStack(spacing: 4) {
111+
HStack(alignment: .firstTextBaseline, spacing: 4) {
112112
Text(title)
113-
.foregroundColor(isSelected ? Color.accentColor : Color.secondary)
113+
.foregroundColor(isSelected ? Color.white : Color.secondary)
114114
.font(.subheadline.weight(.medium))
115115
.lineLimit(1)
116116
.allowsTightening(true)
117117
if let details = details {
118-
Text("(\(details))")
119-
.foregroundColor(isSelected ? Color.accentColor.opacity(0.7) : Color.secondary.opacity(0.7))
120-
.font(.subheadline)
118+
Text("\(details)")
119+
.foregroundColor(isSelected ? Color.white.opacity(0.7) : Color.secondary.opacity(0.7))
120+
.font(.footnote)
121+
.monospacedDigit()
121122
.lineLimit(1)
122123
.allowsTightening(true)
123124
}
124125
}
126+
.padding(EdgeInsets(top: 8, leading: 9, bottom: 8, trailing: 8))
127+
.background(isSelected ? Color.accentColor : Color(.secondarySystemFill).opacity(0.8))
128+
.clipShape(RoundedRectangle(cornerRadius: 10))
125129
}
126130
.buttonStyle(.plain)
127131
}
@@ -135,7 +139,7 @@ struct ConsoleListOptionsView: View {
135139
Button(action: { filters.options.isOnlyErrors.toggle() }) {
136140
Text(Image(systemName: filters.options.isOnlyErrors ? "exclamationmark.octagon.fill" : "exclamationmark.octagon"))
137141
.font(.body)
138-
.foregroundColor(.accentColor)
142+
.foregroundColor(.red)
139143
}
140144
.cornerRadius(4)
141145
.padding(.leading, 1)

0 commit comments

Comments
 (0)