From 6c24038e036ed9933afea54d46f23700a888f6ec Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Matthias=20Hu=CC=88hne?= Date: Fri, 24 May 2024 17:15:43 +0200 Subject: [PATCH] #1342 fix accessibility issue: use dynamic font size --- .../Client/Collection Views/Cells/ActionCell.swift | 2 +- .../Client/View Controllers/ClientItemViewController.swift | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/ownCloudAppShared/Client/Collection Views/Cells/ActionCell.swift b/ownCloudAppShared/Client/Collection Views/Cells/ActionCell.swift index 2e5543e37..76075f4a6 100644 --- a/ownCloudAppShared/Client/Collection Views/Cells/ActionCell.swift +++ b/ownCloudAppShared/Client/Collection Views/Cells/ActionCell.swift @@ -106,7 +106,7 @@ class ActionCell: ThemeableCollectionViewCell { titleLabel.textAlignment = .center - titleLabel.font = UIFont.systemFont(ofSize: 10) + titleLabel.font = UIFont.preferredFont(forTextStyle: .caption2) self.configuredConstraints = [ iconView.leadingAnchor.constraint(greaterThanOrEqualTo: contentView.leadingAnchor, constant: iconInsets.left), diff --git a/ownCloudAppShared/Client/View Controllers/ClientItemViewController.swift b/ownCloudAppShared/Client/View Controllers/ClientItemViewController.swift index a66de97c2..5e38bc2a8 100644 --- a/ownCloudAppShared/Client/View Controllers/ClientItemViewController.swift +++ b/ownCloudAppShared/Client/View Controllers/ClientItemViewController.swift @@ -283,7 +283,7 @@ open class ClientItemViewController: CollectionViewController, SortBarDelegate, footerFolderStatisticsLabel = ThemeCSSLabel(withSelectors: [.sectionFooter, .statistics]) footerFolderStatisticsLabel?.translatesAutoresizingMaskIntoConstraints = false - footerFolderStatisticsLabel?.font = UIFont.systemFont(ofSize: UIFont.smallSystemFontSize) + footerFolderStatisticsLabel?.font = UIFont.preferredFont(forTextStyle: .footnote) footerFolderStatisticsLabel?.textAlignment = .center footerFolderStatisticsLabel?.setContentHuggingPriority(.required, for: .vertical) footerFolderStatisticsLabel?.setContentCompressionResistancePriority(.required, for: .vertical)