From acbe00454ed687c2afd8c432f74a94cca5a07b8c Mon Sep 17 00:00:00 2001
From: Mustafa Merza <mustafa.merza95@gmail.com>
Date: Wed, 14 Aug 2024 18:20:05 +0300
Subject: [PATCH] - Fixed page index background color.

---
 .../DocumentPreview/DocumentPreviewViewController.swift       | 2 ++
 .../ScanSessionPreview/ScanSessionPreviewViewController.swift | 4 +++-
 .../Modules/EditViewController/EditViewController.swift       | 4 +++-
 3 files changed, 8 insertions(+), 2 deletions(-)

diff --git a/MiniScanner/Modules/DocumentPreview/DocumentPreviewViewController.swift b/MiniScanner/Modules/DocumentPreview/DocumentPreviewViewController.swift
index 1394d8d..6184bfc 100644
--- a/MiniScanner/Modules/DocumentPreview/DocumentPreviewViewController.swift
+++ b/MiniScanner/Modules/DocumentPreview/DocumentPreviewViewController.swift
@@ -118,6 +118,8 @@ final class DocumentPreviewViewController: UIViewController, ScanSessionSharable
         
         currentPageLabel.layer.cornerRadius = 5
         
+        currentPageLabel.clipsToBounds = true
+        
         clearSelectionButton.setTitle(.clear.localized, for: .normal)
         
         extraButton.showsMenuAsPrimaryAction = true
diff --git a/MiniScanner/Modules/DocumentPreview/ScanSessionPreview/ScanSessionPreviewViewController.swift b/MiniScanner/Modules/DocumentPreview/ScanSessionPreview/ScanSessionPreviewViewController.swift
index 6661f77..1315b0c 100644
--- a/MiniScanner/Modules/DocumentPreview/ScanSessionPreview/ScanSessionPreviewViewController.swift
+++ b/MiniScanner/Modules/DocumentPreview/ScanSessionPreview/ScanSessionPreviewViewController.swift
@@ -65,6 +65,8 @@ extension ScanSessionPreviewViewController {
         
         currentPageLabel.layer.cornerRadius = 5
         
+        currentPageLabel.clipsToBounds = true
+        
         updateCurrentPageLabel()
         
         setupPagerView()
@@ -74,7 +76,7 @@ extension ScanSessionPreviewViewController {
         
         currentPageLabel.set(color: .gray600)
         
-        currentPageLabel.customLayerBackground(.gray100)
+        currentPageLabel.customBackground(.gray100)
         
         view.customBackground(.base)
         
diff --git a/MiniScanner/Modules/EditViewController/EditViewController.swift b/MiniScanner/Modules/EditViewController/EditViewController.swift
index c6f0ac8..9dfb604 100644
--- a/MiniScanner/Modules/EditViewController/EditViewController.swift
+++ b/MiniScanner/Modules/EditViewController/EditViewController.swift
@@ -189,6 +189,8 @@ public class EditViewController: UIViewController, ScanSessionSharable, ScanSess
         
         pageIndex.layer.cornerRadius = 5
         
+        pageIndex.clipsToBounds = true
+        
         hideCropButtons()
     }
     
@@ -199,7 +201,7 @@ public class EditViewController: UIViewController, ScanSessionSharable, ScanSess
         nextPageButton.customTitleColor(.gray600)
         previousPageButton.customTitleColor(.gray600)
         
-        pageIndex.customLayerBackground(.gray100)
+        pageIndex.customBackground(.gray100)
         pageIndex.set(color: .gray600)
         
         rotateLeftLabel.set(color: .gray600)
-- 
GitLab