Skip to content

Commit

Permalink
coding color
Browse files Browse the repository at this point in the history
Signed-off-by: Marino Faggiana <[email protected]>
  • Loading branch information
marinofaggiana committed May 19, 2024
1 parent b893a32 commit a87c1b5
Show file tree
Hide file tree
Showing 31 changed files with 78 additions and 78 deletions.
2 changes: 1 addition & 1 deletion Share/NCShareExtension+DataSource.swift
Original file line number Diff line number Diff line change
Expand Up @@ -91,7 +91,7 @@ extension NCShareExtension: UICollectionViewDataSource {
cell.indexPath = indexPath
cell.fileUser = metadata.ownerId
cell.labelTitle.text = metadata.fileNameView
cell.labelTitle.textColor = .label
cell.labelTitle.textColor = NCBrandColor.shared.textColor

cell.imageSelect.image = nil
cell.imageStatus.image = nil
Expand Down
2 changes: 1 addition & 1 deletion Share/NCShareExtension.swift
Original file line number Diff line number Diff line change
Expand Up @@ -100,7 +100,7 @@ class NCShareExtension: UIViewController {
commandViewHeightConstraint.constant = heightCommandView

createFolderView.layer.cornerRadius = 10
createFolderImage.image = utility.loadImage(named: "folder.badge.plus", colors: [.label])
createFolderImage.image = utility.loadImage(named: "folder.badge.plus", colors: [NCBrandColor.shared.iconImageColor])
createFolderLabel.text = NSLocalizedString("_create_folder_", comment: "")
let createFolderGesture = UITapGestureRecognizer(target: self, action: #selector(actionCreateFolder))
createFolderView.addGestureRecognizer(createFolderGesture)
Expand Down
2 changes: 1 addition & 1 deletion Widget/Dashboard/DashboardData.swift
Original file line number Diff line number Diff line change
Expand Up @@ -163,7 +163,7 @@ func getDashboardDataEntry(configuration: DashboardIntent?, isPreview: Bool, dis
if let fileName = tableDashboard?.iconClass {
let fileNamePath: String = utilityFileSystem.directoryUserData + "/" + fileName + ".png"
if let image = UIImage(contentsOfFile: fileNamePath) {
imagetmp = image.withTintColor(.label, renderingMode: .alwaysOriginal)
imagetmp = image.withTintColor(NCBrandColor.shared.iconImageColor, renderingMode: .alwaysOriginal)
}
}
let titleImage = imagetmp
Expand Down
8 changes: 4 additions & 4 deletions iOSClient/Activity/NCActivity.swift
Original file line number Diff line number Diff line change
Expand Up @@ -160,7 +160,7 @@ extension NCActivity: UITableViewDelegate {

let label = UILabel()
label.font = UIFont.boldSystemFont(ofSize: 13)
label.textColor = .label
label.textColor = NCBrandColor.shared.textColor
label.text = utility.getTitleFromDate(sectionDates[section])
label.textAlignment = .center
label.layer.cornerRadius = 11
Expand Down Expand Up @@ -216,13 +216,13 @@ extension NCActivity: UITableViewDataSource {
NCNetworking.shared.downloadAvatar(user: comment.actorId, dispalyName: comment.actorDisplayName, fileName: fileName, cell: cell, view: tableView)
// Username
cell.labelUser.text = comment.actorDisplayName
cell.labelUser.textColor = .label
cell.labelUser.textColor = NCBrandColor.shared.textColor
// Date
cell.labelDate.text = utility.dateDiff(comment.creationDateTime as Date)
cell.labelDate.textColor = .systemGray4
// Message
cell.labelMessage.text = comment.message
cell.labelMessage.textColor = .label
cell.labelMessage.textColor = NCBrandColor.shared.textColor
// Button Menu
if comment.actorId == appDelegate.userId {
cell.buttonMenu.isHidden = false
Expand All @@ -246,7 +246,7 @@ extension NCActivity: UITableViewDataSource {
cell.avatar.isHidden = true
cell.subjectTrailingConstraint.constant = 10
cell.didSelectItemEnable = self.didSelectItemEnable
cell.subject.textColor = .label
cell.subject.textColor = NCBrandColor.shared.textColor
cell.viewController = self

// icon
Expand Down
2 changes: 1 addition & 1 deletion iOSClient/Activity/NCActivityCommentView.swift
Original file line number Diff line number Diff line change
Expand Up @@ -48,7 +48,7 @@ class NCActivityCommentView: UIView, UITextFieldDelegate {
} else {
labelUser.text = account.displayName
}
labelUser.textColor = .label
labelUser.textColor = NCBrandColor.shared.textColor
}

func textFieldShouldReturn(_ textField: UITextField) -> Bool {
Expand Down
8 changes: 4 additions & 4 deletions iOSClient/Extensions/UINavigationController+Extension.swift
Original file line number Diff line number Diff line change
Expand Up @@ -37,8 +37,8 @@ extension UINavigationController {
let standardAppearance = UINavigationBarAppearance()
standardAppearance.configureWithDefaultBackground()

standardAppearance.largeTitleTextAttributes = [NSAttributedString.Key.foregroundColor: UIColor.label]
standardAppearance.titleTextAttributes = [NSAttributedString.Key.foregroundColor: UIColor.label]
standardAppearance.largeTitleTextAttributes = [NSAttributedString.Key.foregroundColor: NCBrandColor.shared.textColor]
standardAppearance.titleTextAttributes = [NSAttributedString.Key.foregroundColor: NCBrandColor.shared.textColor]
navigationBar.standardAppearance = standardAppearance

let scrollEdgeAppearance = UINavigationBarAppearance()
Expand All @@ -57,8 +57,8 @@ extension UINavigationController {
let standardAppearance = UINavigationBarAppearance()
standardAppearance.configureWithDefaultBackground()

standardAppearance.largeTitleTextAttributes = [NSAttributedString.Key.foregroundColor: UIColor.label]
standardAppearance.titleTextAttributes = [NSAttributedString.Key.foregroundColor: UIColor.label]
standardAppearance.largeTitleTextAttributes = [NSAttributedString.Key.foregroundColor: NCBrandColor.shared.textColor]
standardAppearance.titleTextAttributes = [NSAttributedString.Key.foregroundColor: NCBrandColor.shared.textColor]
standardAppearance.backgroundColor = .systemGray6
navigationBar.standardAppearance = standardAppearance

Expand Down
2 changes: 1 addition & 1 deletion iOSClient/Main/Collection Common/Cell/NCListCell.swift
Original file line number Diff line number Diff line change
Expand Up @@ -149,7 +149,7 @@ class NCListCell: UICollectionViewCell, UIGestureRecognizerDelegate, NCCellProto
labelTitle.text = ""
labelInfo.text = ""
labelSubinfo.text = ""
labelTitle.textColor = .label
labelTitle.textColor = NCBrandColor.shared.textColor
labelInfo.textColor = .systemGray
labelSubinfo.textColor = .systemGray

Expand Down
6 changes: 3 additions & 3 deletions iOSClient/Main/Collection Common/NCCollectionViewCommon.swift
Original file line number Diff line number Diff line change
Expand Up @@ -1504,7 +1504,7 @@ extension NCCollectionViewCommon: UICollectionViewDataSource {

// Color string find in search

cell.fileTitleLabel?.textColor = .label
cell.fileTitleLabel?.textColor = NCBrandColor.shared.textColor
cell.fileTitleLabel?.font = .systemFont(ofSize: 15)

if isSearchingMode, let literalSearch = self.literalSearch, let title = cell.fileTitleLabel?.text {
Expand Down Expand Up @@ -1595,7 +1595,7 @@ extension NCCollectionViewCommon: UICollectionViewDataSource {
} else {
header.labelSection.text = self.dataSource.getSectionValueLocalization(indexPath: indexPath)
}
header.labelSection.textColor = .label
header.labelSection.textColor = NCBrandColor.shared.textColor

return header

Expand All @@ -1604,7 +1604,7 @@ extension NCCollectionViewCommon: UICollectionViewDataSource {
guard let header = collectionView.dequeueReusableSupplementaryView(ofKind: kind, withReuseIdentifier: "sectionHeader", for: indexPath) as? NCSectionHeader else { return NCSectionHeader() }

header.labelSection.text = self.dataSource.getSectionValueLocalization(indexPath: indexPath)
header.labelSection.textColor = .label
header.labelSection.textColor = NCBrandColor.shared.textColor

return header
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -63,12 +63,12 @@ class NCSectionHeaderMenu: UICollectionReusableView, UIGestureRecognizerDelegate
tap.delegate = self
viewRichWorkspace?.addGestureRecognizer(tap)

markdownParser = MarkdownParser(font: UIFont.systemFont(ofSize: 15), color: .label)
markdownParser = MarkdownParser(font: UIFont.systemFont(ofSize: 15), color: NCBrandColor.shared.textColor)
markdownParser.header.font = UIFont.systemFont(ofSize: 25)
if let richWorkspaceText = richWorkspaceText {
textViewRichWorkspace.attributedText = markdownParser.parse(richWorkspaceText)
}
textViewColor = .label
textViewColor = NCBrandColor.shared.textColor

labelSection.text = ""
viewSectionHeightConstraint.constant = 0
Expand Down Expand Up @@ -231,7 +231,7 @@ class NCSectionFooter: UICollectionReusableView, NCSectionFooterDelegate {

buttonIsHidden(true)
activityIndicatorSection.isHidden = true
activityIndicatorSection.color = .label
activityIndicatorSection.color = NCBrandColor.shared.textColor
}

func setTitleLabel(directories: Int, files: Int, size: Int64) {
Expand Down
4 changes: 2 additions & 2 deletions iOSClient/Main/Create cloud/NCCreateFormUploadConflict.swift
Original file line number Diff line number Diff line change
Expand Up @@ -109,7 +109,7 @@ class NCCreateFormUploadConflict: UIViewController {
buttonCancel.layer.borderColor = UIColor.darkGray.cgColor
buttonCancel.backgroundColor = .systemGray5
buttonCancel.setTitle(NSLocalizedString("_cancel_", comment: ""), for: .normal)
buttonCancel.setTitleColor(.label, for: .normal)
buttonCancel.setTitleColor(NCBrandColor.shared.textColor, for: .normal)

buttonContinue.layer.cornerRadius = 20
buttonContinue.layer.masksToBounds = true
Expand Down Expand Up @@ -502,7 +502,7 @@ extension NCCreateFormUploadConflict: NCCreateFormUploadConflictCellDelegate {

if result {
buttonContinue.isEnabled = true
buttonContinue.setTitleColor(.label, for: .normal)
buttonContinue.setTitleColor(NCBrandColor.shared.textColor, for: .normal)
} else {
buttonContinue.isEnabled = false
buttonContinue.setTitleColor(UIColor.systemGray, for: .normal)
Expand Down
8 changes: 4 additions & 4 deletions iOSClient/Main/Create cloud/NCCreateFormUploadDocuments.swift
Original file line number Diff line number Diff line change
Expand Up @@ -109,7 +109,7 @@ import XLForm

row.cellConfig["textLabel.textAlignment"] = NSTextAlignment.right.rawValue
row.cellConfig["textLabel.font"] = UIFont.systemFont(ofSize: 15.0)
row.cellConfig["textLabel.textColor"] = UIColor.label
row.cellConfig["textLabel.textColor"] = NCBrandColor.shared.textColor

section.addFormRow(row)

Expand All @@ -124,11 +124,11 @@ import XLForm

row.cellConfig["textField.textAlignment"] = NSTextAlignment.right.rawValue
row.cellConfig["textField.font"] = UIFont.systemFont(ofSize: 15.0)
row.cellConfig["textField.textColor"] = UIColor.label
row.cellConfig["textField.textColor"] = NCBrandColor.shared.textColor

row.cellConfig["textLabel.textAlignment"] = NSTextAlignment.right.rawValue
row.cellConfig["textLabel.font"] = UIFont.systemFont(ofSize: 15.0)
row.cellConfig["textLabel.textColor"] = UIColor.label
row.cellConfig["textLabel.textColor"] = NCBrandColor.shared.textColor

section.addFormRow(row)

Expand Down Expand Up @@ -188,7 +188,7 @@ import XLForm
// select
let imageSelect = cell.viewWithTag(300) as? UIImageView
if selectTemplate != nil && selectTemplate?.name == template.name {
cell.backgroundColor = .label
cell.backgroundColor = NCBrandColor.shared.textColor
imageSelect?.image = UIImage(named: "plus100")
imageSelect?.isHidden = false
} else {
Expand Down
6 changes: 3 additions & 3 deletions iOSClient/Media/NCMedia+Command.swift
Original file line number Diff line number Diff line change
Expand Up @@ -70,9 +70,9 @@ extension NCMedia {

func setColor() {
if isTop {
titleDate?.textColor = .label
activityIndicator.color = .label
selectOrCancelButton.setTitleColor(.label, for: .normal)
titleDate?.textColor = NCBrandColor.shared.textColor
activityIndicator.color = NCBrandColor.shared.textColor
selectOrCancelButton.setTitleColor(NCBrandColor.shared.textColor, for: .normal)
menuButton.setImage(NCUtility().loadImage(named: "ellipsis", colors: [NCBrandColor.shared.iconImageColor]), for: .normal)
gradientView.isHidden = true
} else {
Expand Down
2 changes: 1 addition & 1 deletion iOSClient/Menu/NCMenu.swift
Original file line number Diff line number Diff line change
Expand Up @@ -36,7 +36,7 @@ class NCMenu: UITableViewController {

var actions = [NCMenuAction]()
var menuColor = UIColor.systemBackground
var textColor = UIColor.label
var textColor = NCBrandColor.shared.textColor

static func makeNCMenu(with actions: [NCMenuAction], menuColor: UIColor, textColor: UIColor) -> NCMenu? {
let menuViewController = UIStoryboard(name: "NCMenu", bundle: nil).instantiateInitialViewController() as? NCMenu
Expand Down
4 changes: 2 additions & 2 deletions iOSClient/Menu/UIViewController+Menu.swift
Original file line number Diff line number Diff line change
Expand Up @@ -80,7 +80,7 @@ extension UIViewController {
if let url = URL(string: action.icon),
let svgSource = SVGKSourceURL.source(from: url),
let svg = SVGKImage(source: svgSource) {
image = svg.uiImage.withTintColor(.label, renderingMode: .alwaysOriginal)
image = svg.uiImage.withTintColor(NCBrandColor.shared.iconImageColor, renderingMode: .alwaysOriginal)
}
return NCMenuAction(
title: action.title,
Expand All @@ -107,7 +107,7 @@ extension UIViewController {
present(mail, animated: true)
}

func presentMenu(with actions: [NCMenuAction], menuColor: UIColor = .systemBackground, textColor: UIColor = .label) {
func presentMenu(with actions: [NCMenuAction], menuColor: UIColor = .systemBackground, textColor: UIColor = NCBrandColor.shared.textColor) {
guard !actions.isEmpty else { return }
let actions = actions.sorted(by: { $0.order < $1.order })
guard let menuViewController = NCMenu.makeNCMenu(with: actions, menuColor: menuColor, textColor: textColor) else {
Expand Down
6 changes: 3 additions & 3 deletions iOSClient/More/NCMore.swift
Original file line number Diff line number Diff line change
Expand Up @@ -347,15 +347,15 @@ class NCMore: UIViewController, UITableViewDelegate, UITableViewDataSource {
} else {
cell.displayName?.text = account.displayName + " (" + account.alias + ")"
}
cell.displayName.textColor = .label
cell.displayName.textColor = NCBrandColor.shared.textColor
}
cell.accessoryType = UITableViewCell.AccessoryType.disclosureIndicator

if NCGlobal.shared.capabilityUserStatusEnabled, let account = NCManageDatabase.shared.getAccount(predicate: NSPredicate(format: "account == %@", appDelegate.account)) {
let status = utility.getUserStatus(userIcon: account.userStatusIcon, userStatus: account.userStatusStatus, userMessage: account.userStatusMessage)
cell.icon.image = status.onlineStatus
cell.status.text = status.statusMessage
cell.status.textColor = .label
cell.status.textColor = NCBrandColor.shared.textColor
cell.status.trailingBuffer = cell.status.frame.width
if cell.status.labelShouldScroll() {
cell.status.tapToScroll = true
Expand All @@ -379,7 +379,7 @@ class NCMore: UIViewController, UITableViewDelegate, UITableViewDataSource {
cell.imageIcon?.image = utility.loadImage(named: item.icon, colors: [NCBrandColor.shared.iconImageColor])
cell.imageIcon?.contentMode = .scaleAspectFit
cell.labelText?.text = NSLocalizedString(item.name, comment: "")
cell.labelText.textColor = .label
cell.labelText.textColor = NCBrandColor.shared.textColor

cell.accessoryType = UITableViewCell.AccessoryType.disclosureIndicator

Expand Down
4 changes: 2 additions & 2 deletions iOSClient/RichWorkspace/NCViewerRichWorkspace.swift
Original file line number Diff line number Diff line change
Expand Up @@ -53,10 +53,10 @@ import MarkdownKit
let editItem = UIBarButtonItem(image: NCUtility().loadImage(named: "square.and.pencil"), style: UIBarButtonItem.Style.plain, target: self, action: #selector(editItemAction(_:)))
self.navigationItem.rightBarButtonItem = editItem

markdownParser = MarkdownParser(font: UIFont.systemFont(ofSize: 15), color: .label)
markdownParser = MarkdownParser(font: UIFont.systemFont(ofSize: 15), color: NCBrandColor.shared.textColor)
markdownParser.header.font = UIFont.systemFont(ofSize: 25)
textView.attributedText = markdownParser.parse(richWorkspaceText)
textViewColor = .label
textViewColor = NCBrandColor.shared.textColor
}

override func viewDidAppear(_ animated: Bool) {
Expand Down
2 changes: 1 addition & 1 deletion iOSClient/Scan document/NCScan.swift
Original file line number Diff line number Diff line change
Expand Up @@ -75,7 +75,7 @@ class NCScan: UIViewController, NCScanCellCellDelegate {

labelTitlePDFzone.text = NSLocalizedString("_scan_label_document_zone_", comment: "")
labelTitlePDFzone.backgroundColor = .systemGray6
labelTitlePDFzone.textColor = .label
labelTitlePDFzone.textColor = NCBrandColor.shared.textColor

segmentControlFilter.setTitle(NSLocalizedString("_filter_document_", comment: ""), forSegmentAt: 0)
segmentControlFilter.setTitle(NSLocalizedString("_filter_original_", comment: ""), forSegmentAt: 1)
Expand Down
2 changes: 1 addition & 1 deletion iOSClient/Select/NCSelect.swift
Original file line number Diff line number Diff line change
Expand Up @@ -311,7 +311,7 @@ extension NCSelect: UICollectionViewDataSource {
cell.fileObjectId = metadata.ocId
cell.fileUser = metadata.ownerId
cell.labelTitle.text = metadata.fileNameView
cell.labelTitle.textColor = .label
cell.labelTitle.textColor = NCBrandColor.shared.textColor

cell.imageSelect.image = nil
cell.imageStatus.image = nil
Expand Down
10 changes: 5 additions & 5 deletions iOSClient/Settings/NCManageAutoUploadFileName.swift
Original file line number Diff line number Diff line change
Expand Up @@ -50,7 +50,7 @@ class NCManageAutoUploadFileName: XLFormViewController {
row.cellConfig["backgroundColor"] = UIColor.secondarySystemGroupedBackground

row.cellConfig["textLabel.font"] = UIFont.systemFont(ofSize: 15.0)
row.cellConfig["textLabel.textColor"] = UIColor.label
row.cellConfig["textLabel.textColor"] = NCBrandColor.shared.textColor

section.addFormRow(row)

Expand All @@ -62,7 +62,7 @@ class NCManageAutoUploadFileName: XLFormViewController {
row.cellConfig["backgroundColor"] = UIColor.secondarySystemGroupedBackground

row.cellConfig["textLabel.font"] = UIFont.systemFont(ofSize: 15.0)
row.cellConfig["textLabel.textColor"] = UIColor.label
row.cellConfig["textLabel.textColor"] = NCBrandColor.shared.textColor

section.addFormRow(row)

Expand All @@ -80,11 +80,11 @@ class NCManageAutoUploadFileName: XLFormViewController {
row.cellConfig["backgroundColor"] = UIColor.secondarySystemGroupedBackground

row.cellConfig["textLabel.font"] = UIFont.systemFont(ofSize: 15.0)
row.cellConfig["textLabel.textColor"] = UIColor.label
row.cellConfig["textLabel.textColor"] = NCBrandColor.shared.textColor

row.cellConfig["textField.textAlignment"] = NSTextAlignment.right.rawValue
row.cellConfig["textField.font"] = UIFont.systemFont(ofSize: 15.0)
row.cellConfig["textField.textColor"] = UIColor.label
row.cellConfig["textField.textColor"] = NCBrandColor.shared.textColor

section.addFormRow(row)

Expand All @@ -97,7 +97,7 @@ class NCManageAutoUploadFileName: XLFormViewController {

row.cellConfig["textView.backgroundColor"] = UIColor.secondarySystemGroupedBackground
row.cellConfig["textView.font"] = UIFont.systemFont(ofSize: 14.0)
row.cellConfig["textView.textColor"] = UIColor.label
row.cellConfig["textView.textColor"] = NCBrandColor.shared.textColor

section.addFormRow(row)

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -45,7 +45,7 @@ class NCShareAdvancePermissionHeader: UIView {
}
}
fileName.text = metadata.fileNameView
fileName.textColor = .label
fileName.textColor = NCBrandColor.shared.textColor
info.textColor = .secondaryLabel
info.text = utilityFileSystem.transformedSize(metadata.size) + ", " + NCUtility().dateDiff(metadata.date as Date)
}
Expand Down
2 changes: 1 addition & 1 deletion iOSClient/Share/NCShare.swift
Original file line number Diff line number Diff line change
Expand Up @@ -152,7 +152,7 @@ class NCShare: UIViewController, NCShareNetworkingDelegate, NCSharePagingContent
sharedWithYouByNoteImage.image = utility.loadImage(named: "note.text", colors: [NCBrandColor.shared.iconImageColor])
sharedWithYouByNote.isHidden = false
sharedWithYouByNote.text = metadata.note
sharedWithYouByNote.textColor = .label
sharedWithYouByNote.textColor = NCBrandColor.shared.textColor
sharedWithYouByNote.trailingBuffer = sharedWithYouByNote.frame.width
} else {
sharedWithYouByNoteImage.isHidden = true
Expand Down
Loading

0 comments on commit a87c1b5

Please sign in to comment.