From 9d8afc6411678f41045d01d72f9f621739790963 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 fe4145e4d..4ac2dd8ed 100644 --- a/ownCloudAppShared/Client/Collection Views/Cells/ActionCell.swift +++ b/ownCloudAppShared/Client/Collection Views/Cells/ActionCell.swift @@ -110,7 +110,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 5a40c48ce..c1348698c 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)