|
1 | 1 | import SwiftUI |
2 | 2 |
|
3 | 3 | struct PointOfSaleSettingsHardwareDetailView: View { |
| 4 | + @Environment(\.dynamicTypeSize) private var dynamicTypeSize |
| 5 | + |
4 | 6 | let settingsController: PointOfSaleSettingsControllerProtocol |
5 | 7 |
|
6 | 8 | @State private var navigationPath: [NavigationDestination] = [] |
@@ -36,16 +38,21 @@ struct PointOfSaleSettingsHardwareDetailView: View { |
36 | 38 |
|
37 | 39 | List(HardwareDestination.allCases) { destination in |
38 | 40 | NavigationLink(value: NavigationDestination.hardware(destination)) { |
39 | | - HStack(alignment: .firstTextBaseline) { |
| 41 | + DynamicHStack(horizontalAlignment: .leading, spacing: POSSpacing.medium) { |
40 | 42 | Image(systemName: destination.icon) |
41 | 43 | .font(.posBodyLargeRegular()) |
| 44 | + .renderedIf(!dynamicTypeSize.isAccessibilitySize) |
| 45 | + |
42 | 46 | VStack(alignment: .leading, spacing: POSPadding.xSmall) { |
43 | 47 | Text(destination.title) |
44 | 48 | .font(.posBodyLargeRegular()) |
| 49 | + .dynamicTypeSize(...DynamicTypeSize.accessibility2) |
45 | 50 | Text(destination.subtitle) |
46 | 51 | .font(.posBodyMediumRegular()) |
47 | 52 | .foregroundStyle(.secondary) |
| 53 | + .dynamicTypeSize(...DynamicTypeSize.accessibility2) |
48 | 54 | } |
| 55 | + Spacer() |
49 | 56 | } |
50 | 57 | } |
51 | 58 | .listRowSeparator(.hidden) |
@@ -109,16 +116,21 @@ struct PointOfSaleSettingsHardwareDetailView: View { |
109 | 116 | Button { |
110 | 117 | showCardReaderDocumentationModal = true |
111 | 118 | } label: { |
112 | | - HStack(alignment: .firstTextBaseline) { |
| 119 | + DynamicHStack(horizontalAlignment: .leading, spacing: POSSpacing.medium) { |
113 | 120 | Image(systemName: "doc.text") |
114 | 121 | .font(.posBodyLargeRegular()) |
| 122 | + .renderedIf(!dynamicTypeSize.isAccessibilitySize) |
| 123 | + |
115 | 124 | VStack(alignment: .leading, spacing: POSPadding.xSmall) { |
116 | 125 | Text(Localization.cardReaderDocumentationTitle) |
117 | 126 | .font(.posBodyLargeRegular()) |
| 127 | + .dynamicTypeSize(...DynamicTypeSize.accessibility2) |
118 | 128 | Text(Localization.cardReaderDocumentationSubtitle) |
119 | 129 | .font(.posBodyMediumRegular()) |
120 | 130 | .foregroundStyle(.secondary) |
| 131 | + .dynamicTypeSize(...DynamicTypeSize.accessibility2) |
121 | 132 | } |
| 133 | + Spacer() |
122 | 134 | } |
123 | 135 | } |
124 | 136 | .buttonStyle(.plain) |
@@ -157,16 +169,21 @@ struct PointOfSaleSettingsHardwareDetailView: View { |
157 | 169 | Button { |
158 | 170 | handleScannerDestination(destination) |
159 | 171 | } label: { |
160 | | - HStack(alignment: .firstTextBaseline) { |
| 172 | + DynamicHStack(horizontalAlignment: .leading, spacing: POSSpacing.medium) { |
161 | 173 | Image(systemName: destination.icon) |
162 | 174 | .font(.posBodyLargeRegular()) |
| 175 | + .renderedIf(!dynamicTypeSize.isAccessibilitySize) |
| 176 | + |
163 | 177 | VStack(alignment: .leading, spacing: POSPadding.xSmall) { |
164 | 178 | Text(destination.title) |
165 | 179 | .font(.posBodyLargeRegular()) |
| 180 | + .dynamicTypeSize(...DynamicTypeSize.accessibility2) |
166 | 181 | Text(destination.subtitle) |
167 | 182 | .font(.posBodyMediumRegular()) |
168 | 183 | .foregroundStyle(.secondary) |
| 184 | + .dynamicTypeSize(...DynamicTypeSize.accessibility2) |
169 | 185 | } |
| 186 | + Spacer() |
170 | 187 | } |
171 | 188 | } |
172 | 189 | .buttonStyle(.plain) |
|
0 commit comments