From 66a00d4167b7a291c35b22daf391466d6a0fc5f2 Mon Sep 17 00:00:00 2001 From: Niels Andriesse Date: Mon, 22 Feb 2021 15:10:01 +1100 Subject: [PATCH] Clean --- Session/Basic Chats/NewPrivateChatVC.swift | 4 ++-- .../Views & Modals/BlockedModal.swift | 2 +- .../Views & Modals/LinkPreviewModal.swift | 2 +- .../PermissionMissingModal.swift | 2 +- .../Views & Modals/URLModal.swift | 2 +- Session/Home/HomeVC.swift | 4 ++-- Session/Onboarding/FakeChatView.swift | 16 ++++++++------ Session/Onboarding/PNOptionView.swift | 4 +++- Session/Onboarding/SeedReminderView.swift | 5 ++++- Session/Open Groups/JoinOpenGroupVC.swift | 4 ++-- Session/Path/PathStatusView.swift | 6 ++++-- Session/Path/PathVC.swift | 21 ++++++++++++------- Session/Settings/NukeDataModal.swift | 2 +- Session/Settings/QRCodeVC.swift | 4 ++-- Session/Settings/SeedModal.swift | 2 +- Session/Sheets & Modals/Modal.swift | 3 ++- SessionUIKit/Components/TabBar.swift | 9 +++++--- SessionUIKit/Style Guide/Values.swift | 17 --------------- 18 files changed, 56 insertions(+), 53 deletions(-) diff --git a/Session/Basic Chats/NewPrivateChatVC.swift b/Session/Basic Chats/NewPrivateChatVC.swift index 3e5e8c96c..499f929a5 100644 --- a/Session/Basic Chats/NewPrivateChatVC.swift +++ b/Session/Basic Chats/NewPrivateChatVC.swift @@ -77,10 +77,10 @@ final class NewPrivateChatVC : BaseVC, UIPageViewControllerDataSource, UIPageVie pageVCView.set(.width, to: screen.width) let height: CGFloat if #available(iOS 13, *) { - height = navigationController!.view.bounds.height - navigationBar.height() - Values.tabBarHeight + height = navigationController!.view.bounds.height - navigationBar.height() - TabBar.snHeight } else { let statusBarHeight = UIApplication.shared.statusBarFrame.height - height = navigationController!.view.bounds.height - navigationBar.height() - Values.tabBarHeight - statusBarHeight + height = navigationController!.view.bounds.height - navigationBar.height() - TabBar.snHeight - statusBarHeight } pageVCView.set(.height, to: height) enterPublicKeyVC.constrainHeight(to: height) diff --git a/Session/Conversations/Views & Modals/BlockedModal.swift b/Session/Conversations/Views & Modals/BlockedModal.swift index 76b2920f3..88c347211 100644 --- a/Session/Conversations/Views & Modals/BlockedModal.swift +++ b/Session/Conversations/Views & Modals/BlockedModal.swift @@ -39,7 +39,7 @@ final class BlockedModal : Modal { // Unblock button let unblockButton = UIButton() unblockButton.set(.height, to: Values.mediumButtonHeight) - unblockButton.layer.cornerRadius = Values.modalButtonCornerRadius + unblockButton.layer.cornerRadius = Modal.buttonCornerRadius unblockButton.backgroundColor = Colors.buttonBackground unblockButton.titleLabel!.font = .systemFont(ofSize: Values.smallFontSize) unblockButton.setTitleColor(Colors.text, for: UIControl.State.normal) diff --git a/Session/Conversations/Views & Modals/LinkPreviewModal.swift b/Session/Conversations/Views & Modals/LinkPreviewModal.swift index 7b94e06ba..65948c2d1 100644 --- a/Session/Conversations/Views & Modals/LinkPreviewModal.swift +++ b/Session/Conversations/Views & Modals/LinkPreviewModal.swift @@ -35,7 +35,7 @@ final class LinkPreviewModal : Modal { // Enable button let enableButton = UIButton() enableButton.set(.height, to: Values.mediumButtonHeight) - enableButton.layer.cornerRadius = Values.modalButtonCornerRadius + enableButton.layer.cornerRadius = Modal.buttonCornerRadius enableButton.backgroundColor = Colors.buttonBackground enableButton.titleLabel!.font = .systemFont(ofSize: Values.smallFontSize) enableButton.setTitleColor(Colors.text, for: UIControl.State.normal) diff --git a/Session/Conversations/Views & Modals/PermissionMissingModal.swift b/Session/Conversations/Views & Modals/PermissionMissingModal.swift index 045329965..721089492 100644 --- a/Session/Conversations/Views & Modals/PermissionMissingModal.swift +++ b/Session/Conversations/Views & Modals/PermissionMissingModal.swift @@ -39,7 +39,7 @@ final class PermissionMissingModal : Modal { // Settings button let settingsButton = UIButton() settingsButton.set(.height, to: Values.mediumButtonHeight) - settingsButton.layer.cornerRadius = Values.modalButtonCornerRadius + settingsButton.layer.cornerRadius = Modal.buttonCornerRadius settingsButton.backgroundColor = Colors.buttonBackground settingsButton.titleLabel!.font = .systemFont(ofSize: Values.smallFontSize) settingsButton.setTitleColor(Colors.text, for: UIControl.State.normal) diff --git a/Session/Conversations/Views & Modals/URLModal.swift b/Session/Conversations/Views & Modals/URLModal.swift index 373348021..2cfe2ad17 100644 --- a/Session/Conversations/Views & Modals/URLModal.swift +++ b/Session/Conversations/Views & Modals/URLModal.swift @@ -37,7 +37,7 @@ final class URLModal : Modal { // Open button let openButton = UIButton() openButton.set(.height, to: Values.mediumButtonHeight) - openButton.layer.cornerRadius = Values.modalButtonCornerRadius + openButton.layer.cornerRadius = Modal.buttonCornerRadius openButton.backgroundColor = Colors.buttonBackground openButton.titleLabel!.font = .systemFont(ofSize: Values.smallFontSize) openButton.setTitleColor(Colors.text, for: UIControl.State.normal) diff --git a/Session/Home/HomeVC.swift b/Session/Home/HomeVC.swift index eca71c0f5..e2bf1289d 100644 --- a/Session/Home/HomeVC.swift +++ b/Session/Home/HomeVC.swift @@ -265,8 +265,8 @@ final class HomeVC : BaseVC, UITableViewDataSource, UITableViewDelegate, NewConv pathStatusViewContainer.set(.height, to: pathStatusViewContainerSize) let pathStatusView = PathStatusView() pathStatusView.accessibilityLabel = "Current onion routing path button" - pathStatusView.set(.width, to: Values.pathStatusViewSize) - pathStatusView.set(.height, to: Values.pathStatusViewSize) + pathStatusView.set(.width, to: PathStatusView.size) + pathStatusView.set(.height, to: PathStatusView.size) pathStatusViewContainer.addSubview(pathStatusView) pathStatusView.center(.horizontal, in: pathStatusViewContainer) pathStatusView.center(.vertical, in: pathStatusViewContainer) diff --git a/Session/Onboarding/FakeChatView.swift b/Session/Onboarding/FakeChatView.swift index d45e34692..8fcf6bbfa 100644 --- a/Session/Onboarding/FakeChatView.swift +++ b/Session/Onboarding/FakeChatView.swift @@ -24,6 +24,10 @@ final class FakeChatView : UIView { private static let bubbleWidth = CGFloat(224) private static let bubbleCornerRadius = CGFloat(10) + private static let startDelay: TimeInterval = 1 + private static let animationDuration: TimeInterval = 0.4 + private static let chatDelay: TimeInterval = 1.5 + private static let popAnimationStartScale: CGFloat = 0.6 override init(frame: CGRect) { super.init(frame: frame) @@ -86,10 +90,10 @@ final class FakeChatView : UIView { } private func animate() { - let animationDuration = Values.fakeChatAnimationDuration - let delayBetweenMessages = Values.fakeChatDelay + let animationDuration = FakeChatView.animationDuration + let delayBetweenMessages = FakeChatView.chatDelay chatBubbles.forEach { $0.alpha = 0 } - Timer.scheduledTimer(withTimeInterval: Values.fakeChatStartDelay, repeats: false) { [weak self] _ in + Timer.scheduledTimer(withTimeInterval: FakeChatView.startDelay, repeats: false) { [weak self] _ in self?.showChatBubble(at: 0) Timer.scheduledTimer(withTimeInterval: 1.5 * delayBetweenMessages, repeats: false) { _ in self?.showChatBubble(at: 1) @@ -120,12 +124,12 @@ final class FakeChatView : UIView { private func showChatBubble(at index: Int) { let chatBubble = chatBubbles[index] - UIView.animate(withDuration: Values.fakeChatAnimationDuration) { + UIView.animate(withDuration: FakeChatView.animationDuration) { chatBubble.alpha = 1 } - let scale = Values.fakeChatMessagePopAnimationStartScale + let scale = FakeChatView.popAnimationStartScale chatBubble.transform = CGAffineTransform(scaleX: scale, y: scale) - UIView.animate(withDuration: Values.fakeChatAnimationDuration, delay: 0, usingSpringWithDamping: 0.68, initialSpringVelocity: 4, options: .curveEaseInOut, animations: { + UIView.animate(withDuration: FakeChatView.animationDuration, delay: 0, usingSpringWithDamping: 0.68, initialSpringVelocity: 4, options: .curveEaseInOut, animations: { chatBubble.transform = CGAffineTransform(scaleX: 1, y: 1) }, completion: nil) } diff --git a/Session/Onboarding/PNOptionView.swift b/Session/Onboarding/PNOptionView.swift index f9623f62c..aa0e85d29 100644 --- a/Session/Onboarding/PNOptionView.swift +++ b/Session/Onboarding/PNOptionView.swift @@ -7,6 +7,8 @@ final class OptionView : UIView { private let isRecommended: Bool var isSelected = false { didSet { handleIsSelectedChanged() } } + private static let cornerRadius: CGFloat = 8 + init(title: String, explanation: String, delegate: OptionViewDelegate, isRecommended: Bool = false) { self.title = title self.explanation = explanation @@ -27,7 +29,7 @@ final class OptionView : UIView { private func setUpViewHierarchy() { backgroundColor = Colors.pnOptionBackground // Round corners - layer.cornerRadius = Values.pnOptionCornerRadius + layer.cornerRadius = OptionView.cornerRadius // Set up border layer.borderWidth = 1 layer.borderColor = Colors.pnOptionBorder.cgColor diff --git a/Session/Onboarding/SeedReminderView.swift b/Session/Onboarding/SeedReminderView.swift index aaa06700e..ca165b034 100644 --- a/Session/Onboarding/SeedReminderView.swift +++ b/Session/Onboarding/SeedReminderView.swift @@ -11,7 +11,7 @@ final class SeedReminderView : UIView { result.progressViewStyle = .bar result.progressTintColor = Colors.accent result.backgroundColor = isLightMode ? UIColor(hex: 0x000000).withAlphaComponent(0.1) : UIColor(hex: 0xFFFFFF).withAlphaComponent(0.1) - result.set(.height, to: Values.progressBarThickness) + result.set(.height, to: SeedReminderView.progressBarThickness) return result }() @@ -32,6 +32,9 @@ final class SeedReminderView : UIView { return result }() + // MARK: Settings + private static let progressBarThickness: CGFloat = 2 + // MARK: Lifecycle init(hasContinueButton: Bool) { self.hasContinueButton = hasContinueButton diff --git a/Session/Open Groups/JoinOpenGroupVC.swift b/Session/Open Groups/JoinOpenGroupVC.swift index 2c100e17b..a812efaf2 100644 --- a/Session/Open Groups/JoinOpenGroupVC.swift +++ b/Session/Open Groups/JoinOpenGroupVC.swift @@ -78,10 +78,10 @@ final class JoinOpenGroupVC : BaseVC, UIPageViewControllerDataSource, UIPageView pageVCView.set(.width, to: screen.width) let height: CGFloat if #available(iOS 13, *) { - height = navigationController!.view.bounds.height - navigationBar.height() - Values.tabBarHeight + height = navigationController!.view.bounds.height - navigationBar.height() - TabBar.snHeight } else { let statusBarHeight = UIApplication.shared.statusBarFrame.height - height = navigationController!.view.bounds.height - navigationBar.height() - Values.tabBarHeight - statusBarHeight + height = navigationController!.view.bounds.height - navigationBar.height() - TabBar.snHeight - statusBarHeight } pageVCView.set(.height, to: height) enterChatURLVC.constrainHeight(to: height) diff --git a/Session/Path/PathStatusView.swift b/Session/Path/PathStatusView.swift index f3413feef..18ba2dafb 100644 --- a/Session/Path/PathStatusView.swift +++ b/Session/Path/PathStatusView.swift @@ -2,6 +2,8 @@ import UIKit final class PathStatusView : UIView { + static let size = CGFloat(8) + override init(frame: CGRect) { super.init(frame: frame) setUpViewHierarchy() @@ -15,7 +17,7 @@ final class PathStatusView : UIView { } private func setUpViewHierarchy() { - layer.cornerRadius = Values.pathStatusViewSize / 2 + layer.cornerRadius = PathStatusView.size / 2 layer.masksToBounds = false if OnionRequestAPI.paths.isEmpty { OnionRequestAPI.paths = Storage.shared.getOnionRequestPaths() @@ -36,7 +38,7 @@ final class PathStatusView : UIView { private func setColor(to color: UIColor, isAnimated: Bool) { backgroundColor = color - let size = Values.pathStatusViewSize + let size = PathStatusView.size let glowConfiguration = UIView.CircularGlowConfiguration(size: size, color: color, isAnimated: isAnimated, radius: isLightMode ? 6 : 8) setCircularGlow(with: glowConfiguration) } diff --git a/Session/Path/PathVC.swift b/Session/Path/PathVC.swift index 925a71353..154eeed86 100644 --- a/Session/Path/PathVC.swift +++ b/Session/Path/PathVC.swift @@ -22,6 +22,11 @@ final class PathVC : BaseVC { result.addTarget(self, action: #selector(learnMore), for: UIControl.Event.touchUpInside) return result }() + + // MARK: Settings + static let dotSize = CGFloat(8) + static let expandedDotSize = CGFloat(16) + static let rowHeight = isIPhone5OrSmaller ? CGFloat(52) : CGFloat(75) // MARK: Lifecycle override func viewDidLoad() { @@ -131,8 +136,8 @@ final class PathVC : BaseVC { // MARK: General private func getPathRow(title: String, subtitle: String?, location: LineView.Location, dotAnimationStartDelay: Double, dotAnimationRepeatInterval: Double) -> UIStackView { let lineView = LineView(location: location, dotAnimationStartDelay: dotAnimationStartDelay, dotAnimationRepeatInterval: dotAnimationRepeatInterval) - lineView.set(.width, to: Values.pathRowExpandedDotSize) - lineView.set(.height, to: Values.pathRowHeight) + lineView.set(.width, to: PathVC.expandedDotSize) + lineView.set(.height, to: PathVC.rowHeight) let titleLabel = UILabel() titleLabel.textColor = Colors.text titleLabel.font = .systemFont(ofSize: Values.mediumFontSize) @@ -188,10 +193,10 @@ private final class LineView : UIView { private lazy var dotView: UIView = { let result = UIView() - result.layer.cornerRadius = Values.pathRowDotSize / 2 + result.layer.cornerRadius = PathVC.dotSize / 2 let glowRadius: CGFloat = isLightMode ? 1 : 2 let glowColor = isLightMode ? UIColor.black.withAlphaComponent(0.4) : UIColor.black - let glowConfiguration = UIView.CircularGlowConfiguration(size: Values.pathRowDotSize, color: glowColor, isAnimated: true, animationDuration: 0.5, radius: glowRadius) + let glowConfiguration = UIView.CircularGlowConfiguration(size: PathVC.dotSize, color: glowColor, isAnimated: true, animationDuration: 0.5, radius: glowRadius) result.setCircularGlow(with: glowConfiguration) result.backgroundColor = Colors.accent return result @@ -215,7 +220,7 @@ private final class LineView : UIView { private func setUpViewHierarchy() { let lineView = UIView() - lineView.set(.width, to: Values.pathRowLineThickness) + lineView.set(.width, to: Values.separatorThickness) lineView.backgroundColor = Colors.text addSubview(lineView) lineView.center(.horizontal, in: self) @@ -227,7 +232,7 @@ private final class LineView : UIView { case .top, .middle: lineView.pin(.bottom, to: .bottom, of: self) case .bottom: lineView.bottomAnchor.constraint(equalTo: centerYAnchor).isActive = true } - let dotSize = Values.pathRowDotSize + let dotSize = PathVC.dotSize dotViewWidthConstraint = dotView.set(.width, to: dotSize) dotViewHeightConstraint = dotView.set(.height, to: dotSize) addSubview(dotView) @@ -254,14 +259,14 @@ private final class LineView : UIView { } private func expandDot() { - let newSize = Values.pathRowExpandedDotSize + let newSize = PathVC.expandedDotSize let newGlowRadius: CGFloat = isLightMode ? 4 : 6 let newGlowColor = Colors.accent.withAlphaComponent(0.6) updateDotView(size: newSize, glowRadius: newGlowRadius, glowColor: newGlowColor) } private func collapseDot() { - let newSize = Values.pathRowDotSize + let newSize = PathVC.dotSize let newGlowRadius: CGFloat = isLightMode ? 1 : 2 let newGlowColor = isLightMode ? UIColor.black.withAlphaComponent(0.4) : UIColor.black updateDotView(size: newSize, glowRadius: newGlowRadius, glowColor: newGlowColor) diff --git a/Session/Settings/NukeDataModal.swift b/Session/Settings/NukeDataModal.swift index 413cd0745..494dcef78 100644 --- a/Session/Settings/NukeDataModal.swift +++ b/Session/Settings/NukeDataModal.swift @@ -23,7 +23,7 @@ final class NukeDataModal : Modal { // Set up nuke data button let nukeDataButton = UIButton() nukeDataButton.set(.height, to: Values.mediumButtonHeight) - nukeDataButton.layer.cornerRadius = Values.modalButtonCornerRadius + nukeDataButton.layer.cornerRadius = Modal.buttonCornerRadius if isDarkMode { nukeDataButton.backgroundColor = Colors.destructive } diff --git a/Session/Settings/QRCodeVC.swift b/Session/Settings/QRCodeVC.swift index ffdf62a8d..b2d085a78 100644 --- a/Session/Settings/QRCodeVC.swift +++ b/Session/Settings/QRCodeVC.swift @@ -68,10 +68,10 @@ final class QRCodeVC : BaseVC, UIPageViewControllerDataSource, UIPageViewControl pageVCView.set(.width, to: screen.width) let height: CGFloat if #available(iOS 13, *) { - height = navigationController!.view.bounds.height - navigationBar.height() - Values.tabBarHeight + height = navigationController!.view.bounds.height - navigationBar.height() - TabBar.snHeight } else { let statusBarHeight = UIApplication.shared.statusBarFrame.height - height = navigationController!.view.bounds.height - navigationBar.height() - Values.tabBarHeight - statusBarHeight + height = navigationController!.view.bounds.height - navigationBar.height() - TabBar.snHeight - statusBarHeight } pageVCView.set(.height, to: height) viewMyQRCodeVC.constrainHeight(to: height) diff --git a/Session/Settings/SeedModal.swift b/Session/Settings/SeedModal.swift index 1aae18602..11528450b 100644 --- a/Session/Settings/SeedModal.swift +++ b/Session/Settings/SeedModal.swift @@ -48,7 +48,7 @@ final class SeedModal : Modal { // Set up copy button let copyButton = UIButton() copyButton.set(.height, to: Values.mediumButtonHeight) - copyButton.layer.cornerRadius = Values.modalButtonCornerRadius + copyButton.layer.cornerRadius = Modal.buttonCornerRadius copyButton.backgroundColor = Colors.buttonBackground copyButton.titleLabel!.font = .systemFont(ofSize: Values.smallFontSize) copyButton.setTitleColor(Colors.text, for: UIControl.State.normal) diff --git a/Session/Sheets & Modals/Modal.swift b/Session/Sheets & Modals/Modal.swift index 23b7e4d4d..b925d5fb4 100644 --- a/Session/Sheets & Modals/Modal.swift +++ b/Session/Sheets & Modals/Modal.swift @@ -20,7 +20,7 @@ class Modal : BaseVC { lazy var cancelButton: UIButton = { let result = UIButton() result.set(.height, to: Values.mediumButtonHeight) - result.layer.cornerRadius = Values.modalButtonCornerRadius + result.layer.cornerRadius = Modal.buttonCornerRadius result.backgroundColor = Colors.buttonBackground result.titleLabel!.font = .systemFont(ofSize: Values.smallFontSize) result.setTitleColor(Colors.text, for: UIControl.State.normal) @@ -30,6 +30,7 @@ class Modal : BaseVC { // MARK: Settings private static let cornerRadius: CGFloat = 10 + static let buttonCornerRadius = CGFloat(5) // MARK: Lifecycle override func viewDidLoad() { diff --git a/SessionUIKit/Components/TabBar.swift b/SessionUIKit/Components/TabBar.swift index 68e4a0ba0..612604a7c 100644 --- a/SessionUIKit/Components/TabBar.swift +++ b/SessionUIKit/Components/TabBar.swift @@ -12,7 +12,7 @@ public final class TabBar : UIView { result.textColor = Colors.text.withAlphaComponent(Values.mediumOpacity) result.textAlignment = .center result.text = tab.title - result.set(.height, to: Values.tabBarHeight - Values.separatorThickness - Values.accentLineThickness) + result.set(.height, to: TabBar.snHeight - Values.separatorThickness - Values.accentLineThickness) return result } @@ -33,6 +33,9 @@ public final class TabBar : UIView { } } + // MARK: Settings + public static let snHeight = isIPhone5OrSmaller ? CGFloat(32) : CGFloat(48) + // MARK: Lifecycle public init(tabs: [Tab]) { self.tabs = tabs @@ -49,7 +52,7 @@ public final class TabBar : UIView { } private func setUpViewHierarchy() { - set(.height, to: Values.tabBarHeight) + set(.height, to: TabBar.snHeight) tabLabels.forEach { tabLabel in let tapGestureRecognizer = UITapGestureRecognizer(target: self, action: #selector(handleTabLabelTapped(_:))) tabLabel.addGestureRecognizer(tapGestureRecognizer) @@ -60,7 +63,7 @@ public final class TabBar : UIView { tabLabelStackView.spacing = Values.mediumSpacing let tapGestureRecognizer = UITapGestureRecognizer(target: self, action: #selector(handleTabLabelTapped(_:))) tabLabelStackView.addGestureRecognizer(tapGestureRecognizer) - tabLabelStackView.set(.height, to: Values.tabBarHeight - Values.separatorThickness - Values.accentLineThickness) + tabLabelStackView.set(.height, to: TabBar.snHeight - Values.separatorThickness - Values.accentLineThickness) addSubview(tabLabelStackView) let separator = UIView() separator.backgroundColor = Colors.separator diff --git a/SessionUIKit/Style Guide/Values.swift b/SessionUIKit/Style Guide/Values.swift index ffb282c0f..41eda4647 100644 --- a/SessionUIKit/Style Guide/Values.swift +++ b/SessionUIKit/Style Guide/Values.swift @@ -31,18 +31,7 @@ public final class Values : NSObject { @objc public static let searchBarHeight = CGFloat(36) - // TODO ---------------- - @objc public static var separatorThickness: CGFloat { return 1 / UIScreen.main.scale } - @objc public static let tabBarHeight = isIPhone5OrSmaller ? CGFloat(32) : CGFloat(48) - @objc public static let modalButtonCornerRadius = CGFloat(5) - @objc public static let progressBarThickness: CGFloat = 2 - @objc public static let pnOptionCornerRadius = CGFloat(8) - @objc public static let pathStatusViewSize = CGFloat(8) - @objc public static var pathRowLineThickness: CGFloat { return 1 / UIScreen.main.scale } - @objc public static let pathRowDotSize = CGFloat(8) - @objc public static let pathRowExpandedDotSize = CGFloat(16) - @objc public static let pathRowHeight = isIPhone5OrSmaller ? CGFloat(52) : CGFloat(75) // MARK: - Distances @objc public static let verySmallSpacing = CGFloat(4) @@ -53,10 +42,4 @@ public final class Values : NSObject { @objc public static let massiveSpacing = CGFloat(64) @objc public static let newConversationButtonBottomOffset = CGFloat(52) @objc public static let onboardingButtonBottomOffset = isIPhone5OrSmaller ? CGFloat(52) : CGFloat(72) - - // MARK: - Animation Values - @objc public static let fakeChatStartDelay: TimeInterval = 1 - @objc public static let fakeChatAnimationDuration: TimeInterval = 0.4 - @objc public static let fakeChatDelay: TimeInterval = 1.5 - @objc public static let fakeChatMessagePopAnimationStartScale: CGFloat = 0.6 }