From 3462daf4ecc3e9a14072eddec1cac67ce969e043 Mon Sep 17 00:00:00 2001
From: Mustafa Merza <mustafa.merza95@gmail.com>
Date: Thu, 15 Aug 2024 13:46:00 +0300
Subject: [PATCH] - Added custom primary, secondary, tertiary buttons with
 their colors.

---
 MiniScanner.xcodeproj/project.pbxproj         | 12 +++++++
 .../Controls/UIPrimaryButton.swift            | 27 ++++++++++++++++
 .../Controls/UISecondaryButton.swift          | 27 ++++++++++++++++
 .../Controls/UITertiaryButton.swift           | 27 ++++++++++++++++
 .../AllFolderTableViewCell.swift              |  2 +-
 .../FolderCollectionViewCell.swift            |  2 +-
 .../KNAlert/KNAlertViewController.swift       | 16 ++--------
 .../KNAlert/KNAlertViewController.xib         | 14 +++++++--
 .../EditViewController.swift                  | 12 ++-----
 .../EditViewController/EditViewController.xib | 31 ++++++++++++-------
 .../SignatureViewController.swift             |  7 ++---
 .../SignatureViewController.xib               | 16 ++++++----
 12 files changed, 143 insertions(+), 50 deletions(-)
 create mode 100644 MiniScanner/Core/Presentation/Controls/UIPrimaryButton.swift
 create mode 100644 MiniScanner/Core/Presentation/Controls/UISecondaryButton.swift
 create mode 100644 MiniScanner/Core/Presentation/Controls/UITertiaryButton.swift

diff --git a/MiniScanner.xcodeproj/project.pbxproj b/MiniScanner.xcodeproj/project.pbxproj
index 4d01f9a..dcd3c43 100644
--- a/MiniScanner.xcodeproj/project.pbxproj
+++ b/MiniScanner.xcodeproj/project.pbxproj
@@ -159,6 +159,9 @@
 		53F21F912C1248EC00172BFC /* FolderCollectionViewCell.swift in Sources */ = {isa = PBXBuildFile; fileRef = 53F21F8F2C1248EC00172BFC /* FolderCollectionViewCell.swift */; };
 		53F21F922C1248EC00172BFC /* FolderCollectionViewCell.xib in Resources */ = {isa = PBXBuildFile; fileRef = 53F21F902C1248EC00172BFC /* FolderCollectionViewCell.xib */; };
 		6708A6042C50FCA50036805D /* EPSignature in Frameworks */ = {isa = PBXBuildFile; productRef = 6708A6032C50FCA50036805D /* EPSignature */; };
+		6709C05C2C6DFE3C009C3F11 /* UIPrimaryButton.swift in Sources */ = {isa = PBXBuildFile; fileRef = 6709C05B2C6DFE3C009C3F11 /* UIPrimaryButton.swift */; };
+		6709C05E2C6DFE44009C3F11 /* UISecondaryButton.swift in Sources */ = {isa = PBXBuildFile; fileRef = 6709C05D2C6DFE44009C3F11 /* UISecondaryButton.swift */; };
+		6709C0602C6E0005009C3F11 /* UITertiaryButton.swift in Sources */ = {isa = PBXBuildFile; fileRef = 6709C05F2C6E0005009C3F11 /* UITertiaryButton.swift */; };
 		67106C942C4EAC0100874BFC /* CustomTabBarLayerProtocol.swift in Sources */ = {isa = PBXBuildFile; fileRef = 67106C922C4EAC0000874BFC /* CustomTabBarLayerProtocol.swift */; };
 		67106C952C4EAC0100874BFC /* CustomTabBarLayer.swift in Sources */ = {isa = PBXBuildFile; fileRef = 67106C932C4EAC0000874BFC /* CustomTabBarLayer.swift */; };
 		672C46442C47B1F300497EF0 /* Localizable.xcstrings in Resources */ = {isa = PBXBuildFile; fileRef = 672C46432C47B1F300497EF0 /* Localizable.xcstrings */; };
@@ -488,6 +491,9 @@
 		53F21F8A2C1246AF00172BFC /* AllFolderTableViewCell.xib */ = {isa = PBXFileReference; lastKnownFileType = file.xib; path = AllFolderTableViewCell.xib; sourceTree = "<group>"; };
 		53F21F8F2C1248EC00172BFC /* FolderCollectionViewCell.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = FolderCollectionViewCell.swift; sourceTree = "<group>"; };
 		53F21F902C1248EC00172BFC /* FolderCollectionViewCell.xib */ = {isa = PBXFileReference; lastKnownFileType = file.xib; path = FolderCollectionViewCell.xib; sourceTree = "<group>"; };
+		6709C05B2C6DFE3C009C3F11 /* UIPrimaryButton.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = UIPrimaryButton.swift; sourceTree = "<group>"; };
+		6709C05D2C6DFE44009C3F11 /* UISecondaryButton.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = UISecondaryButton.swift; sourceTree = "<group>"; };
+		6709C05F2C6E0005009C3F11 /* UITertiaryButton.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = UITertiaryButton.swift; sourceTree = "<group>"; };
 		67106C922C4EAC0000874BFC /* CustomTabBarLayerProtocol.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = CustomTabBarLayerProtocol.swift; sourceTree = "<group>"; };
 		67106C932C4EAC0000874BFC /* CustomTabBarLayer.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = CustomTabBarLayer.swift; sourceTree = "<group>"; };
 		672C46432C47B1F300497EF0 /* Localizable.xcstrings */ = {isa = PBXFileReference; lastKnownFileType = text.json.xcstrings; path = Localizable.xcstrings; sourceTree = "<group>"; };
@@ -1355,6 +1361,9 @@
 				678BD70E2C4CF1A000833DA5 /* CustomMenuPicker.swift */,
 				67A2AF7C2C6B76BC00039F30 /* CustomPicker.swift */,
 				67A2AF862C6B8B2A00039F30 /* PrimaryButton.swift */,
+				6709C05B2C6DFE3C009C3F11 /* UIPrimaryButton.swift */,
+				6709C05D2C6DFE44009C3F11 /* UISecondaryButton.swift */,
+				6709C05F2C6E0005009C3F11 /* UITertiaryButton.swift */,
 			);
 			path = Controls;
 			sourceTree = "<group>";
@@ -2055,6 +2064,7 @@
 				53014F932C11A8E80071CE39 /* PDFCreator.swift in Sources */,
 				675FF4F12C622CDE00E42214 /* ScanSessionPrintable.swift in Sources */,
 				539D1C852C164F85009DB24A /* CustomTabBarView.swift in Sources */,
+				6709C05C2C6DFE3C009C3F11 /* UIPrimaryButton.swift in Sources */,
 				53E7D33B2C1B00880025A1D3 /* FSPagerViewObjcCompat.m in Sources */,
 				EC702537254E1DE000BE1958 /* UIViewController+Extensions.swift in Sources */,
 				675FF4EF2C621F5D00E42214 /* ScanSessionSharable.swift in Sources */,
@@ -2166,6 +2176,7 @@
 				5399969A2C27130000671340 /* ConstraintLayoutGuideDSL.swift in Sources */,
 				53014F922C11A8E80071CE39 /* ScannedItemRenderer.swift in Sources */,
 				EC8A9B14254DC9D300F9AF99 /* LocalFileManager.swift in Sources */,
+				6709C05E2C6DFE44009C3F11 /* UISecondaryButton.swift in Sources */,
 				67A2AF6E2C6B46D100039F30 /* ScanSessionPreviewViewController.swift in Sources */,
 				678809ED2C6A2ECB00EF9046 /* CompressType.swift in Sources */,
 				5399968A2C27130000671340 /* ConstraintMakerExtendable.swift in Sources */,
@@ -2216,6 +2227,7 @@
 				677E65EE2C5A6C0A0039E2C5 /* SessionModel.xcdatamodeld in Sources */,
 				67A2AF752C6B6F5100039F30 /* SettingButton.swift in Sources */,
 				6794328C2C689E9F002E5F8D /* WXCompress.swift in Sources */,
+				6709C0602C6E0005009C3F11 /* UITertiaryButton.swift in Sources */,
 				53E7D3382C1B00880025A1D3 /* FSPagerViewLayoutAttributes.swift in Sources */,
 				53014F8E2C11A8E80071CE39 /* ImageScannerController.swift in Sources */,
 				677E65E92C5A36A40039E2C5 /* UpdateScanSessionUseCase.swift in Sources */,
diff --git a/MiniScanner/Core/Presentation/Controls/UIPrimaryButton.swift b/MiniScanner/Core/Presentation/Controls/UIPrimaryButton.swift
new file mode 100644
index 0000000..1db54f6
--- /dev/null
+++ b/MiniScanner/Core/Presentation/Controls/UIPrimaryButton.swift
@@ -0,0 +1,27 @@
+//
+//  UIPrimaryButton.swift
+//  MiniScanner
+//
+//  Created by Mustafa Merza on 8/15/24.
+//  Copyright © 2024 AppsNectar. All rights reserved.
+//
+
+import Foundation
+
+class UIPrimaryButton: UIButton {
+    
+    override func awakeFromNib() {
+        super.awakeFromNib()
+        setupUI()
+    }
+    
+    private func setupUI() {
+        
+        customTint(.clear)
+        customBackground(.primary)
+        customTitleColor(.primaryText)
+        
+        set(font: .medium(16))
+        cornerRadiuss = 12
+    }
+}
diff --git a/MiniScanner/Core/Presentation/Controls/UISecondaryButton.swift b/MiniScanner/Core/Presentation/Controls/UISecondaryButton.swift
new file mode 100644
index 0000000..e22b253
--- /dev/null
+++ b/MiniScanner/Core/Presentation/Controls/UISecondaryButton.swift
@@ -0,0 +1,27 @@
+//
+//  UISecondaryButton.swift
+//  MiniScanner
+//
+//  Created by Mustafa Merza on 8/15/24.
+//  Copyright © 2024 AppsNectar. All rights reserved.
+//
+
+import Foundation
+
+class UISecondaryButton: UIButton {
+    
+    override func awakeFromNib() {
+        super.awakeFromNib()
+        setupUI()
+    }
+    
+    private func setupUI() {
+        
+        customTint(.clear)
+        customBackground(.secondary)
+        customTitleColor(.secondaryText)
+        
+        set(font: .medium(16))
+        cornerRadiuss = 12
+    }
+}
diff --git a/MiniScanner/Core/Presentation/Controls/UITertiaryButton.swift b/MiniScanner/Core/Presentation/Controls/UITertiaryButton.swift
new file mode 100644
index 0000000..2b72e6c
--- /dev/null
+++ b/MiniScanner/Core/Presentation/Controls/UITertiaryButton.swift
@@ -0,0 +1,27 @@
+//
+//  UITertiaryButton.swift
+//  MiniScanner
+//
+//  Created by Mustafa Merza on 8/15/24.
+//  Copyright © 2024 AppsNectar. All rights reserved.
+//
+
+import Foundation
+
+class UITertiaryButton: UIButton {
+    
+    override func awakeFromNib() {
+        super.awakeFromNib()
+        setupUI()
+    }
+    
+    private func setupUI() {
+        
+        customTint(.clear)
+        customBackground(.tertiary)
+        customTitleColor(.tertiaryText)
+        
+        set(font: .medium(16))
+        cornerRadiuss = 12
+    }
+}
diff --git a/MiniScanner/Modules/Documents/Customs/CustomViews/AllFolderTableView/AllFolderTableViewCell.swift b/MiniScanner/Modules/Documents/Customs/CustomViews/AllFolderTableView/AllFolderTableViewCell.swift
index 3177a4d..dc4839e 100644
--- a/MiniScanner/Modules/Documents/Customs/CustomViews/AllFolderTableView/AllFolderTableViewCell.swift
+++ b/MiniScanner/Modules/Documents/Customs/CustomViews/AllFolderTableView/AllFolderTableViewCell.swift
@@ -72,7 +72,7 @@ final class AllFolderTableViewCell: UIView {
         
         foldersLabel.set(color: .gray600)
         
-        addFolderButton.set(color: .primary)
+        addFolderButton.customTitleColor(.primary)
     }
     
     private func setupFonts() {
diff --git a/MiniScanner/Modules/Documents/Customs/CustomViews/AllFolderTableView/CustomCells/FolderCollectionViewCell.swift b/MiniScanner/Modules/Documents/Customs/CustomViews/AllFolderTableView/CustomCells/FolderCollectionViewCell.swift
index c080bd4..417a589 100644
--- a/MiniScanner/Modules/Documents/Customs/CustomViews/AllFolderTableView/CustomCells/FolderCollectionViewCell.swift
+++ b/MiniScanner/Modules/Documents/Customs/CustomViews/AllFolderTableView/CustomCells/FolderCollectionViewCell.swift
@@ -75,7 +75,7 @@ class FolderCollectionViewCell: UICollectionViewCell {
     private func setupColors() {
         boxView.customBackground(.gray100)
         
-        titleLabel.set(color: isFolderSelected ? .gray0 : .gray600)
+        titleLabel.set(color: isFolderSelected ? .primaryText : .gray600)
         deleteButton.customTint(.gray0)
     }
     
diff --git a/MiniScanner/Modules/Documents/Customs/CustomViews/KNAlert/KNAlertViewController.swift b/MiniScanner/Modules/Documents/Customs/CustomViews/KNAlert/KNAlertViewController.swift
index 07bf270..9821c59 100644
--- a/MiniScanner/Modules/Documents/Customs/CustomViews/KNAlert/KNAlertViewController.swift
+++ b/MiniScanner/Modules/Documents/Customs/CustomViews/KNAlert/KNAlertViewController.swift
@@ -36,8 +36,8 @@ final class KNAlertViewController: BMViewController {
     @IBOutlet weak var textFieldViewBottomConstrait: NSLayoutConstraint!
     
     @IBOutlet private weak var buttonStackView: UIStackView!
-    @IBOutlet private weak var confirmationButton: UIButton!
-    @IBOutlet private weak var destructiveButton: UIButton!
+    @IBOutlet private weak var confirmationButton: UISecondaryButton!
+    @IBOutlet private weak var destructiveButton: UITertiaryButton!
     
     @IBOutlet private weak var buttonView_leading: NSLayoutConstraint!
     @IBOutlet private weak var buttonsView_trailing: NSLayoutConstraint!
@@ -160,12 +160,10 @@ extension KNAlertViewController {
         // buttons
         
         confirmationButton.set(localized: confirmButtonTitle)
-        confirmationButton.layer.cornerRadius = 20
         
         confirmationButton.addTarget(self, action: #selector(confirmationButtonTapped), for: .touchUpInside)
         
         destructiveButton.set(localized: destructiveButtonTitle)
-        destructiveButton.layer.cornerRadius = 20
         
         destructiveButton.addTarget(self, action: #selector(destructiveButtonTapped), for: .touchUpInside)
         
@@ -196,12 +194,6 @@ extension KNAlertViewController {
         messageTextView.textColor = ColorStyle.gray600.uiColor
         
         buttonStackView.customBackground(.clear)
-        
-        destructiveButton.customBackground(.gray100)
-        destructiveButton.customTitleColor(.gray600)
-        
-        confirmationButton.customTitleColor(.gray0)
-        confirmationButton.customBackground(.gray600)
     }
     
     private func setupFonts() {
@@ -211,10 +203,6 @@ extension KNAlertViewController {
         titleLabel.set(font: .bold(20))
         
         messageTextView.font = .regular(18)
-        
-        confirmationButton.set(font: .bold(20))
-        
-        destructiveButton.set(font: .regular(20))
     }
     
     @objc func textChanged() {
diff --git a/MiniScanner/Modules/Documents/Customs/CustomViews/KNAlert/KNAlertViewController.xib b/MiniScanner/Modules/Documents/Customs/CustomViews/KNAlert/KNAlertViewController.xib
index 3e52343..261edc4 100644
--- a/MiniScanner/Modules/Documents/Customs/CustomViews/KNAlert/KNAlertViewController.xib
+++ b/MiniScanner/Modules/Documents/Customs/CustomViews/KNAlert/KNAlertViewController.xib
@@ -92,13 +92,15 @@
                                 <stackView opaque="NO" contentMode="scaleToFill" distribution="fillEqually" translatesAutoresizingMaskIntoConstraints="NO" id="mFa-hh-JzT">
                                     <rect key="frame" x="0.0" y="0.0" width="330" height="52"/>
                                     <subviews>
-                                        <button opaque="NO" contentMode="scaleToFill" contentHorizontalAlignment="center" contentVerticalAlignment="center" buttonType="system" lineBreakMode="middleTruncation" translatesAutoresizingMaskIntoConstraints="NO" id="M8l-cs-Sk1" userLabel="destructiveButton">
+                                        <button opaque="NO" contentMode="scaleToFill" contentHorizontalAlignment="center" contentVerticalAlignment="center" buttonType="system" lineBreakMode="middleTruncation" translatesAutoresizingMaskIntoConstraints="NO" id="M8l-cs-Sk1" userLabel="destructiveButton" customClass="UITertiaryButton" customModule="MiniScanner" customModuleProvider="target">
                                             <rect key="frame" x="0.0" y="0.0" width="165" height="52"/>
                                             <state key="normal" title=" "/>
+                                            <buttonConfiguration key="configuration" style="filled" title=" "/>
                                         </button>
-                                        <button opaque="NO" contentMode="scaleToFill" contentHorizontalAlignment="center" contentVerticalAlignment="center" buttonType="system" lineBreakMode="middleTruncation" translatesAutoresizingMaskIntoConstraints="NO" id="6RT-mM-MZO" userLabel="confirmButton">
+                                        <button opaque="NO" contentMode="scaleToFill" contentHorizontalAlignment="center" contentVerticalAlignment="center" buttonType="system" lineBreakMode="middleTruncation" translatesAutoresizingMaskIntoConstraints="NO" id="6RT-mM-MZO" userLabel="confirmButton" customClass="UISecondaryButton" customModule="MiniScanner" customModuleProvider="target">
                                             <rect key="frame" x="165" y="0.0" width="165" height="52"/>
                                             <state key="normal" title=" "/>
+                                            <buttonConfiguration key="configuration" style="filled" title=" "/>
                                         </button>
                                     </subviews>
                                 </stackView>
@@ -147,6 +149,14 @@
             <point key="canvasLocation" x="131.8840579710145" y="131.91964285714286"/>
         </view>
     </objects>
+    <designables>
+        <designable name="6RT-mM-MZO">
+            <size key="intrinsicContentSize" width="28.5" height="38.5"/>
+        </designable>
+        <designable name="M8l-cs-Sk1">
+            <size key="intrinsicContentSize" width="28.5" height="38.5"/>
+        </designable>
+    </designables>
     <resources>
         <image name="Folder" width="108" height="108"/>
         <systemColor name="labelColor">
diff --git a/MiniScanner/Modules/EditViewController/EditViewController.swift b/MiniScanner/Modules/EditViewController/EditViewController.swift
index 05ffaed..0cc9eeb 100644
--- a/MiniScanner/Modules/EditViewController/EditViewController.swift
+++ b/MiniScanner/Modules/EditViewController/EditViewController.swift
@@ -25,7 +25,7 @@ public class EditViewController: UIViewController, ScanSessionSharable, ScanSess
     // MARK: - Outlets
     @IBOutlet weak var banner: BannerView!
     @IBOutlet weak var pageIndex: UILabel!
-    @IBOutlet weak var continueButton: UIButton!
+    @IBOutlet weak var continueButton: UIPrimaryButton!
     @IBOutlet weak var directShareLabel: UILabel!
     
     @IBOutlet weak var signatureLabel: UILabel!
@@ -40,7 +40,7 @@ public class EditViewController: UIViewController, ScanSessionSharable, ScanSess
     
     @IBOutlet weak var cropButtonsStackView: UIStackView!
     
-    @IBOutlet weak var saveCropButton: UIButton!
+    @IBOutlet weak var saveCropButton: UIPrimaryButton!
     
     @IBOutlet weak var rotateRightLabel: UILabel!
     @IBOutlet weak var autoDetectionLabel: UILabel!
@@ -160,7 +160,6 @@ public class EditViewController: UIViewController, ScanSessionSharable, ScanSess
         activityIndicator.centerYAnchor.constraint(equalTo: view.centerYAnchor).isActive = true
         
         continueButton.set(localized: .Continue)
-        continueButton.layer.cornerRadius = 10
         
         options = ImageScannerOptions()
         
@@ -181,7 +180,6 @@ public class EditViewController: UIViewController, ScanSessionSharable, ScanSess
         cropLabel.text = .crop.localized
         
         saveCropButton.set(localized: .save)
-        saveCropButton.layer.cornerRadius = 10
         
         rotateLeftLabel.text = .rotateLeft.localized
         autoDetectionLabel.text = .autoDetection.localized
@@ -208,9 +206,6 @@ public class EditViewController: UIViewController, ScanSessionSharable, ScanSess
         autoDetectionLabel.set(color: .gray600)
         rotateRightLabel.set(color: .gray600)
         
-        continueButton.customBackground(.primary)
-        continueButton.customTitleColor(.gray0)
-        
         shareTypeLabel.set(color: .gray600)
         
         directShareLabel.set(color: .gray600)
@@ -218,9 +213,6 @@ public class EditViewController: UIViewController, ScanSessionSharable, ScanSess
         exportTextLabel.set(color: .gray600)
         editLabel.set(color: .gray600)
         cropLabel.set(color: .gray600)
-        
-        saveCropButton.customBackground(.primary)
-        saveCropButton.customTitleColor(.gray0)
     }
     
     private func setupFonts() {
diff --git a/MiniScanner/Modules/EditViewController/EditViewController.xib b/MiniScanner/Modules/EditViewController/EditViewController.xib
index 3850113..be852e8 100644
--- a/MiniScanner/Modules/EditViewController/EditViewController.xib
+++ b/MiniScanner/Modules/EditViewController/EditViewController.xib
@@ -114,16 +114,16 @@
                             </constraints>
                         </view>
                         <view contentMode="scaleToFill" translatesAutoresizingMaskIntoConstraints="NO" id="P6L-ql-BgN">
-                            <rect key="frame" x="109.66666666666667" y="9" width="178.66666666666663" height="30"/>
+                            <rect key="frame" x="114.66666666666667" y="9" width="168.66666666666663" height="30"/>
                             <subviews>
                                 <label opaque="NO" userInteractionEnabled="NO" contentMode="center" horizontalHuggingPriority="251" verticalHuggingPriority="251" text="Direct Share" textAlignment="natural" lineBreakMode="tailTruncation" baselineAdjustment="alignBaselines" adjustsFontForContentSizeCategory="YES" adjustsFontSizeToFit="NO" translatesAutoresizingMaskIntoConstraints="NO" id="ORg-21-KNr">
-                                    <rect key="frame" x="0.0" y="0.0" width="98.333333333333329" height="30"/>
+                                    <rect key="frame" x="0.0" y="0.0" width="88.333333333333329" height="30"/>
                                     <fontDescription key="fontDescription" name="Poppins-Medium" family="Poppins" pointSize="16"/>
                                     <nil key="textColor"/>
                                     <nil key="highlightedColor"/>
                                 </label>
                                 <view contentMode="scaleToFill" translatesAutoresizingMaskIntoConstraints="NO" id="tLe-qh-X4U" userLabel="Share Type View">
-                                    <rect key="frame" x="114.33333333333334" y="0.0" width="64.333333333333343" height="30"/>
+                                    <rect key="frame" x="104.33333333333334" y="0.0" width="64.333333333333343" height="30"/>
                                     <subviews>
                                         <label opaque="NO" userInteractionEnabled="NO" contentMode="left" horizontalHuggingPriority="251" verticalHuggingPriority="251" text="Label" textAlignment="natural" lineBreakMode="tailTruncation" baselineAdjustment="alignBaselines" adjustsFontSizeToFit="NO" translatesAutoresizingMaskIntoConstraints="NO" id="qEE-VR-2hN">
                                             <rect key="frame" x="0.0" y="0.0" width="41.333333333333336" height="30"/>
@@ -308,7 +308,7 @@
                                             </constraints>
                                         </imageView>
                                         <label opaque="NO" userInteractionEnabled="NO" contentMode="left" horizontalHuggingPriority="251" verticalHuggingPriority="251" text="edit" textAlignment="center" lineBreakMode="tailTruncation" numberOfLines="2" baselineAdjustment="alignBaselines" adjustsFontSizeToFit="NO" translatesAutoresizingMaskIntoConstraints="NO" id="qsI-va-wrT">
-                                            <rect key="frame" x="0.0" y="52" width="99.666666666666671" height="24"/>
+                                            <rect key="frame" x="0.0" y="52" width="99.666666666666671" height="20"/>
                                             <fontDescription key="fontDescription" name="Poppins-Regular" family="Poppins" pointSize="17"/>
                                             <nil key="textColor"/>
                                             <nil key="highlightedColor"/>
@@ -410,15 +410,17 @@
                                 <view contentMode="scaleToFill" translatesAutoresizingMaskIntoConstraints="NO" id="bgA-NI-AzQ">
                                     <rect key="frame" x="298.66666666666669" y="0.0" width="99.333333333333314" height="90"/>
                                     <subviews>
-                                        <button opaque="NO" contentMode="scaleToFill" contentHorizontalAlignment="center" contentVerticalAlignment="center" buttonType="system" lineBreakMode="middleTruncation" translatesAutoresizingMaskIntoConstraints="NO" id="jE5-UT-fB1">
+                                        <button opaque="NO" contentMode="scaleToFill" contentHorizontalAlignment="center" contentVerticalAlignment="center" buttonType="system" lineBreakMode="middleTruncation" translatesAutoresizingMaskIntoConstraints="NO" id="jE5-UT-fB1" customClass="UIPrimaryButton" customModule="MiniScanner" customModuleProvider="target">
                                             <rect key="frame" x="0.0" y="17.666666666666629" width="99.333333333333329" height="55"/>
-                                            <color key="backgroundColor" red="0.1215686275" green="0.52549019610000003" blue="1" alpha="1" colorSpace="calibratedRGB"/>
                                             <constraints>
                                                 <constraint firstAttribute="height" constant="55" id="JX1-6T-Gsm"/>
                                             </constraints>
                                             <fontDescription key="fontDescription" name="Poppins-Regular" family="Poppins" pointSize="14"/>
                                             <inset key="imageEdgeInsets" minX="0.0" minY="0.0" maxX="2.2250738585072014e-308" maxY="0.0"/>
                                             <state key="normal" title="Button"/>
+                                            <buttonConfiguration key="configuration" style="filled" title="Continue">
+                                                <fontDescription key="titleFontDescription" name="Poppins-Regular" family="Poppins" pointSize="14"/>
+                                            </buttonConfiguration>
                                             <connections>
                                                 <action selector="continueTapped:" destination="-1" eventType="touchUpInside" id="64G-bX-vXa"/>
                                             </connections>
@@ -548,15 +550,17 @@
                                 <view contentMode="scaleToFill" translatesAutoresizingMaskIntoConstraints="NO" id="cUK-87-uvd">
                                     <rect key="frame" x="298.66666666666669" y="0.0" width="99.333333333333314" height="90"/>
                                     <subviews>
-                                        <button opaque="NO" contentMode="scaleToFill" contentHorizontalAlignment="center" contentVerticalAlignment="center" buttonType="system" lineBreakMode="middleTruncation" translatesAutoresizingMaskIntoConstraints="NO" id="oHb-tw-dkv">
+                                        <button opaque="NO" contentMode="scaleToFill" contentHorizontalAlignment="center" contentVerticalAlignment="center" buttonType="system" lineBreakMode="middleTruncation" translatesAutoresizingMaskIntoConstraints="NO" id="oHb-tw-dkv" customClass="UIPrimaryButton" customModule="MiniScanner" customModuleProvider="target">
                                             <rect key="frame" x="0.0" y="17.666666666666629" width="99.333333333333329" height="55"/>
-                                            <color key="backgroundColor" name="Buttons Blue"/>
                                             <constraints>
                                                 <constraint firstAttribute="height" constant="55" id="IEx-ed-KIp"/>
                                             </constraints>
                                             <fontDescription key="fontDescription" type="system" pointSize="14"/>
                                             <inset key="imageEdgeInsets" minX="0.0" minY="0.0" maxX="2.2250738585072014e-308" maxY="0.0"/>
                                             <state key="normal" title="Button"/>
+                                            <buttonConfiguration key="configuration" style="filled" title="Save">
+                                                <fontDescription key="titleFontDescription" type="system" pointSize="14"/>
+                                            </buttonConfiguration>
                                             <connections>
                                                 <action selector="saveCropButtonTapped:" destination="-1" eventType="touchUpInside" id="9R6-8a-Ad5"/>
                                             </connections>
@@ -606,6 +610,14 @@
             <point key="canvasLocation" x="138.13953488372093" y="19.95708154506438"/>
         </view>
     </objects>
+    <designables>
+        <designable name="jE5-UT-fB1">
+            <size key="intrinsicContentSize" width="80.666666666666671" height="30.333333333333332"/>
+        </designable>
+        <designable name="oHb-tw-dkv">
+            <size key="intrinsicContentSize" width="55.333333333333336" height="31"/>
+        </designable>
+    </designables>
     <resources>
         <image name="airdrop-img" width="48" height="48"/>
         <image name="arrow.backward" catalog="system" width="128" height="95"/>
@@ -622,9 +634,6 @@
         <image name="signature-ic" width="24" height="23"/>
         <image name="telegram-img" width="49" height="48"/>
         <image name="whatsapp-img" width="48" height="48"/>
-        <namedColor name="Buttons Blue">
-            <color red="0.12156862745098039" green="0.52549019607843139" blue="1" alpha="1" colorSpace="custom" customColorSpace="sRGB"/>
-        </namedColor>
         <namedColor name="Main Text">
             <color red="0.31372549019607843" green="0.31372549019607843" blue="0.31372549019607843" alpha="1" colorSpace="custom" customColorSpace="sRGB"/>
         </namedColor>
diff --git a/MiniScanner/Modules/SignatureViewController/SignatureViewController.swift b/MiniScanner/Modules/SignatureViewController/SignatureViewController.swift
index 2aa4a07..0319567 100644
--- a/MiniScanner/Modules/SignatureViewController/SignatureViewController.swift
+++ b/MiniScanner/Modules/SignatureViewController/SignatureViewController.swift
@@ -27,8 +27,8 @@ class SignatureViewController: UIViewController {
     @IBOutlet weak var saveDefaultSignatureLabel: UILabel!
     
     @IBOutlet weak var saveToDefaultsView: UIStackView!
-    @IBOutlet weak var saveButton: UIButton!
-    @IBOutlet weak var defaultSignatureButton: UIButton!
+    @IBOutlet weak var saveButton: UIPrimaryButton!
+    @IBOutlet weak var defaultSignatureButton: UISecondaryButton!
     
     @IBOutlet weak var rotateRightImageView: UIImageView!
     
@@ -101,9 +101,6 @@ class SignatureViewController: UIViewController {
         rotateLeftLabel.set(color: .gray600)
         rotateRightLabel.set(color: .gray600)
         
-        saveButton.customTint(.primary)
-        defaultSignatureButton.customTint(.primary)
-        
         saveDefaultSignatureLabel.set(color: .gray600)
         
         defaultSignatureSwitch.onTintColor = ColorStyle.primary.uiColor
diff --git a/MiniScanner/Modules/SignatureViewController/SignatureViewController.xib b/MiniScanner/Modules/SignatureViewController/SignatureViewController.xib
index a9df09d..d6dec17 100644
--- a/MiniScanner/Modules/SignatureViewController/SignatureViewController.xib
+++ b/MiniScanner/Modules/SignatureViewController/SignatureViewController.xib
@@ -190,7 +190,7 @@
                                     </subviews>
                                     <color key="backgroundColor" white="0.0" alpha="0.0" colorSpace="custom" customColorSpace="genericGamma22GrayColorSpace"/>
                                 </stackView>
-                                <button opaque="NO" contentMode="scaleToFill" contentHorizontalAlignment="center" contentVerticalAlignment="center" buttonType="system" lineBreakMode="middleTruncation" translatesAutoresizingMaskIntoConstraints="NO" id="qQS-X1-GKg">
+                                <button opaque="NO" contentMode="scaleToFill" contentHorizontalAlignment="center" contentVerticalAlignment="center" buttonType="system" lineBreakMode="middleTruncation" translatesAutoresizingMaskIntoConstraints="NO" id="qQS-X1-GKg" customClass="UIPrimaryButton" customModule="MiniScanner" customModuleProvider="target">
                                     <rect key="frame" x="284" y="0.0" width="61" height="47"/>
                                     <state key="normal" title="Button"/>
                                     <buttonConfiguration key="configuration" style="filled" title="Save"/>
@@ -198,9 +198,8 @@
                                         <action selector="onTouchSaveButton:" destination="-1" eventType="touchUpInside" id="nJS-g0-TJ5"/>
                                     </connections>
                                 </button>
-                                <button hidden="YES" opaque="NO" contentMode="scaleToFill" contentHorizontalAlignment="center" contentVerticalAlignment="center" buttonType="system" lineBreakMode="middleTruncation" translatesAutoresizingMaskIntoConstraints="NO" id="9Yr-SZ-FD7">
+                                <button hidden="YES" opaque="NO" contentMode="scaleToFill" contentHorizontalAlignment="center" contentVerticalAlignment="center" buttonType="system" lineBreakMode="middleTruncation" translatesAutoresizingMaskIntoConstraints="NO" id="9Yr-SZ-FD7" customClass="UISecondaryButton" customModule="MiniScanner" customModuleProvider="target">
                                     <rect key="frame" x="16" y="0.0" width="156" height="47"/>
-                                    <color key="tintColor" systemColor="systemOrangeColor"/>
                                     <state key="normal" title="Button"/>
                                     <buttonConfiguration key="configuration" style="filled" title="Default Signature"/>
                                     <connections>
@@ -248,6 +247,14 @@
             <point key="canvasLocation" x="129" y="-11"/>
         </view>
     </objects>
+    <designables>
+        <designable name="9Yr-SZ-FD7">
+            <size key="intrinsicContentSize" width="156" height="38.333333333333336"/>
+        </designable>
+        <designable name="qQS-X1-GKg">
+            <size key="intrinsicContentSize" width="61" height="38.333333333333336"/>
+        </designable>
+    </designables>
     <resources>
         <image name="rotate-sig-left-ic" width="31" height="30"/>
         <image name="rotate-sig-right-ic" width="30" height="30"/>
@@ -255,9 +262,6 @@
         <systemColor name="systemBackgroundColor">
             <color white="1" alpha="1" colorSpace="custom" customColorSpace="genericGamma22GrayColorSpace"/>
         </systemColor>
-        <systemColor name="systemOrangeColor">
-            <color red="1" green="0.58431372550000005" blue="0.0" alpha="1" colorSpace="custom" customColorSpace="sRGB"/>
-        </systemColor>
         <systemColor name="systemRedColor">
             <color red="1" green="0.23137254900000001" blue="0.18823529410000001" alpha="1" colorSpace="custom" customColorSpace="sRGB"/>
         </systemColor>
-- 
GitLab