File tree 3 files changed +6
-48
lines changed
3 files changed +6
-48
lines changed Original file line number Diff line number Diff line change 6
6
},
7
7
"-" : {
8
8
9
- },
10
- "%@, %@" : {
11
- "localizations" : {
12
- "en" : {
13
- "stringUnit" : {
14
- "state" : "new",
15
- "value" : "%1$@, %2$@"
16
- }
17
- }
18
- }
19
9
},
20
10
"%g× %@" : {
21
11
"extractionState" : "manual",
Original file line number Diff line number Diff line change @@ -48,16 +48,10 @@ private struct InformationSectionContent: View {
48
48
}
49
49
50
50
private func cell( _ name: LocalizedStringKey , value: String ) -> some View {
51
- HStack {
52
- Text ( name)
53
- Spacer ( )
51
+ LabeledContent ( name) {
54
52
Text ( value)
55
53
. monospacedDigit ( )
56
- . lineLimit ( 1 )
57
- . foregroundColor ( . secondary)
58
54
}
59
- . accessibilityElement ( )
60
- . accessibilityLabel ( " \( Text ( name) ) , \( value) " )
61
55
}
62
56
}
63
57
@@ -109,16 +103,10 @@ private struct ExperienceStartupTimesSectionContent: View {
109
103
}
110
104
111
105
private func cell( _ name: LocalizedStringKey , value: String ) -> some View {
112
- HStack {
113
- Text ( name)
114
- Spacer ( )
106
+ LabeledContent ( name) {
115
107
Text ( value)
116
108
. monospacedDigit ( )
117
- . lineLimit ( 1 )
118
- . foregroundColor ( . secondary)
119
109
}
120
- . accessibilityElement ( )
121
- . accessibilityLabel ( " \( Text ( name) ) , \( value) " )
122
110
}
123
111
}
124
112
@@ -146,16 +134,10 @@ private struct ServiceStartupTimesSectionContent: View {
146
134
}
147
135
148
136
private func cell( _ name: LocalizedStringKey , value: String ) -> some View {
149
- HStack {
150
- Text ( name)
151
- Spacer ( )
137
+ LabeledContent ( name) {
152
138
Text ( value)
153
139
. monospacedDigit ( )
154
- . lineLimit ( 1 )
155
- . foregroundColor ( . secondary)
156
140
}
157
- . accessibilityElement ( )
158
- . accessibilityLabel ( " \( Text ( name) ) , \( value) " )
159
141
}
160
142
}
161
143
Original file line number Diff line number Diff line change @@ -13,11 +13,8 @@ private struct UrlCacheView: View {
13
13
var body : some View {
14
14
HStack {
15
15
Button ( action: clearUrlCache) {
16
- HStack {
17
- Text ( " Clear URL cache " )
18
- Spacer ( )
16
+ LabeledContent ( " Clear URL cache " ) {
19
17
Text ( urlCacheSize)
20
- . font ( . footnote)
21
18
. foregroundColor ( . red)
22
19
}
23
20
}
@@ -52,16 +49,7 @@ private struct InfoCell: View {
52
49
}
53
50
54
51
private func content( ) -> some View {
55
- HStack {
56
- Text ( title)
57
- Spacer ( )
58
- Text ( value)
59
- . foregroundColor ( . secondary)
60
- . multilineTextAlignment ( . trailing)
61
- . lineLimit ( 2 )
62
- }
63
- . accessibilityElement ( )
64
- . accessibilityLabel ( " \( Text ( title) ) , \( value) " )
52
+ LabeledContent ( title, value: value)
65
53
}
66
54
}
67
55
@@ -257,9 +245,7 @@ struct SettingsView: View {
257
245
}
258
246
}
259
247
#else
260
- HStack {
261
- Text ( key)
262
- Spacer ( )
248
+ LabeledContent ( key) {
263
249
numberTextField ( value: value)
264
250
}
265
251
#endif
You can’t perform that action at this time.
0 commit comments