Skip to content

Commit a73a7fb

Browse files
committed
update help detail view for larger accessibility sizes
1 parent cb046b0 commit a73a7fb

File tree

1 file changed

+17
-3
lines changed

1 file changed

+17
-3
lines changed

WooCommerce/Classes/POS/Presentation/Settings/PointOfSaleSettingsHelpDetailView.swift

Lines changed: 17 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,8 @@
11
import SwiftUI
22

33
struct PointOfSaleSettingsHelpDetailView: View {
4+
@Environment(\.dynamicTypeSize) private var dynamicTypeSize
5+
46
@State private var showProductRestrictions = false
57
@State private var showDocumentation = false
68
@State private var showSupport = false
@@ -17,16 +19,20 @@ struct PointOfSaleSettingsHelpDetailView: View {
1719
Button {
1820
showProductRestrictions = true
1921
} label: {
20-
HStack(alignment: .firstTextBaseline) {
22+
DynamicHStack(horizontalAlignment: .leading, spacing: POSSpacing.medium) {
2123
Image(systemName: "magnifyingglass")
2224
.font(.posBodyLargeRegular())
25+
.renderedIf(!dynamicTypeSize.isAccessibilitySize)
2326
VStack(alignment: .leading, spacing: POSPadding.xSmall) {
2427
Text(Localization.productRestrictionsInfo)
2528
.font(.posBodyLargeRegular())
29+
.dynamicTypeSize(...DynamicTypeSize.accessibility2)
2630
Text(Localization.productRestrictionsInfoSubtitle)
2731
.font(.posBodyMediumRegular())
2832
.foregroundStyle(.secondary)
33+
.dynamicTypeSize(...DynamicTypeSize.accessibility2)
2934
}
35+
Spacer()
3036
}
3137
}
3238
.listRowSeparator(.hidden)
@@ -35,16 +41,20 @@ struct PointOfSaleSettingsHelpDetailView: View {
3541
Button {
3642
showDocumentation = true
3743
} label: {
38-
HStack(alignment: .firstTextBaseline) {
44+
DynamicHStack(horizontalAlignment: .leading, spacing: POSSpacing.medium) {
3945
Image(systemName: "doc.text")
4046
.font(.posBodyLargeRegular())
47+
.renderedIf(!dynamicTypeSize.isAccessibilitySize)
4148
VStack(alignment: .leading, spacing: POSPadding.xSmall) {
4249
Text(Localization.documentationTitle)
4350
.font(.posBodyLargeRegular())
51+
.dynamicTypeSize(...DynamicTypeSize.accessibility2)
4452
Text(Localization.documentationSubtitle)
4553
.font(.posBodyMediumRegular())
4654
.foregroundStyle(.secondary)
55+
.dynamicTypeSize(...DynamicTypeSize.accessibility2)
4756
}
57+
Spacer()
4858
}
4959
}
5060
.listRowSeparator(.hidden)
@@ -53,16 +63,20 @@ struct PointOfSaleSettingsHelpDetailView: View {
5363
Button {
5464
showSupport = true
5565
} label: {
56-
HStack(alignment: .firstTextBaseline) {
66+
DynamicHStack(horizontalAlignment: .leading, spacing: POSSpacing.medium) {
5767
Image(systemName: "questionmark")
5868
.font(.posBodyLargeRegular())
69+
.renderedIf(!dynamicTypeSize.isAccessibilitySize)
5970
VStack(alignment: .leading, spacing: POSPadding.xSmall) {
6071
Text(Localization.getSupportTitle)
6172
.font(.posBodyLargeRegular())
73+
.dynamicTypeSize(...DynamicTypeSize.accessibility2)
6274
Text(Localization.getSupportSubtitle)
6375
.font(.posBodyMediumRegular())
6476
.foregroundStyle(.secondary)
77+
.dynamicTypeSize(...DynamicTypeSize.accessibility2)
6578
}
79+
Spacer()
6680
}
6781
}
6882
.listRowSeparator(.hidden)

0 commit comments

Comments
 (0)