From fb8ede01aa4e92522b6f139152319cb65dd22118 Mon Sep 17 00:00:00 2001 From: Kjuly Date: Mon, 11 Dec 2023 09:21:39 +0800 Subject: [PATCH] Rename SizeLength to SideLength --- .../KYNearbyConnectionViewConstants.swift | 6 +++--- .../PeerCell/KYNearbyConnectionPeerCell.swift | 6 +++--- 2 files changed, 6 insertions(+), 6 deletions(-) diff --git a/KYNearbyService/Sources/KYNearbyConnectionView/KYNearbyConnectionViewConstants.swift b/KYNearbyService/Sources/KYNearbyConnectionView/KYNearbyConnectionViewConstants.swift index f63f0ca..fbf812c 100644 --- a/KYNearbyService/Sources/KYNearbyConnectionView/KYNearbyConnectionViewConstants.swift +++ b/KYNearbyService/Sources/KYNearbyConnectionView/KYNearbyConnectionViewConstants.swift @@ -26,14 +26,14 @@ enum KYNearbyConnectionViewDimension { // static let large: CGFloat = 10 } - public enum IconButtonSizeLength { + public enum IconButtonSideLength { static let regular: CGFloat = 44 static let small: CGFloat = 32 } public enum PeerCell { public static let horizontalSpacing: CGFloat = 10 - public static let peerStatusIndicatorSizeLength: CGFloat = 20 - public static let secondaryContentLeadingPadding: CGFloat = peerStatusIndicatorSizeLength + horizontalSpacing + public static let peerStatusIndicatorSideLength: CGFloat = 20 + public static let secondaryContentLeadingPadding: CGFloat = peerStatusIndicatorSideLength + horizontalSpacing } } diff --git a/KYNearbyService/Sources/KYNearbyConnectionView/PeerCell/KYNearbyConnectionPeerCell.swift b/KYNearbyService/Sources/KYNearbyConnectionView/PeerCell/KYNearbyConnectionPeerCell.swift index 2363476..02fe0f6 100644 --- a/KYNearbyService/Sources/KYNearbyConnectionView/PeerCell/KYNearbyConnectionPeerCell.swift +++ b/KYNearbyService/Sources/KYNearbyConnectionView/PeerCell/KYNearbyConnectionPeerCell.swift @@ -143,7 +143,7 @@ struct KYNearbyConnectionPeerCell: View { private func _peerStatusAndNameLabel() -> some View { Image(systemName: KYNearbyConnectionViewIconName.peerStatusIndicator) .foregroundColor(_statusColor()) - .frame(width: KYNearbyConnectionViewDimension.PeerCell.peerStatusIndicatorSizeLength) + .frame(width: KYNearbyConnectionViewDimension.PeerCell.peerStatusIndicatorSideLength) Text(self.item.displayName) .font(self.labelFont) .foregroundColor(self.defaultContentColor) @@ -192,8 +192,8 @@ struct KYNearbyConnectionPeerCell: View { Image(systemName: KYNearbyConnectionViewIconName.terminateProcessing) .foregroundColor(self.accentColor) } - .frame(width: KYNearbyConnectionViewDimension.IconButtonSizeLength.small, - height: KYNearbyConnectionViewDimension.IconButtonSizeLength.regular, + .frame(width: KYNearbyConnectionViewDimension.IconButtonSideLength.small, + height: KYNearbyConnectionViewDimension.IconButtonSideLength.regular, alignment: .trailing) }