Эх сурвалжийг харах

coding

Signed-off-by: marinofaggiana <ios@nextcloud.com>
marinofaggiana 2 жил өмнө
parent
commit
70ce56830d

+ 6 - 0
iOSClient/Brand/NCBrand.swift

@@ -165,6 +165,12 @@ class NCBrandColor: NSObject {
 
     public var userColors: [CGColor] = []
 
+    @objc public var annotationColor: UIColor {
+        get {
+            return .systemBlue
+        }
+    }
+
     @objc public var systemBackground: UIColor {
         get {
             if #available(iOS 13, *) {

+ 1 - 1
iOSClient/Main/Collection Common/NCCollectionViewCommon.swift

@@ -1518,7 +1518,7 @@ extension NCCollectionViewCommon: UICollectionViewDataSource {
             if let literalSearch = self.literalSearch {
                 let longestWordRange = (metadata.fileName.lowercased() as NSString).range(of: literalSearch)
                 let attributedString = NSMutableAttributedString(string: metadata.fileName, attributes: [NSAttributedString.Key.font : UIFont.systemFont(ofSize: 15)])
-                attributedString.setAttributes([NSAttributedString.Key.font : UIFont.boldSystemFont(ofSize: 15)], range: longestWordRange)
+                attributedString.setAttributes([NSAttributedString.Key.font : UIFont.boldSystemFont(ofSize: 15), NSAttributedString.Key.foregroundColor : NCBrandColor.shared.annotationColor], range: longestWordRange)
                 cell.fileTitleLabel?.attributedText = attributedString
             }
         } else {

+ 1 - 1
iOSClient/Viewer/NCViewerPDF/NCViewerPDF.swift

@@ -479,7 +479,7 @@ class NCViewerPDF: UIViewController, NCViewerPDFSearchDelegate {
         pdfSelection.pages.forEach { page in
             let highlight = PDFAnnotation(bounds: pdfSelection.bounds(for: page), forType: .highlight, withProperties: nil)
             highlight.endLineStyle = .square
-            highlight.color = .yellow
+            highlight.color = NCBrandColor.shared.annotationColor
             page.addAnnotation(highlight)
         }
         if let page = pdfSelection.pages.first {

+ 1 - 1
iOSClient/Viewer/NCViewerPDF/NCViewerPDFSearch.swift

@@ -91,7 +91,7 @@ class NCViewerPDFSearch: UITableViewController, UISearchBarDelegate, PDFDocument
 
         let nsRange = NSString(string: extendSelection.string!).range(of: pdfSelection.string!, options: String.CompareOptions.caseInsensitive)
         if nsRange.location != NSNotFound {
-            let attributedSubString = NSAttributedString(string: NSString(string: extendSelection.string!).substring(with: nsRange), attributes: [NSAttributedString.Key.font: UIFont.boldSystemFont(ofSize: 17)])
+            let attributedSubString = NSAttributedString(string: NSString(string: extendSelection.string!).substring(with: nsRange), attributes: [NSAttributedString.Key.font: UIFont.boldSystemFont(ofSize: 17), NSAttributedString.Key.foregroundColor : NCBrandColor.shared.annotationColor])
             let attributedString = NSMutableAttributedString(string: extendSelection.string!)
             attributedString.replaceCharacters(in: nsRange, with: attributedSubString)
             cell.searchResultTextLabel.attributedText = attributedString