Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion Podfile
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ use_frameworks!
# ignore all warnings from all dependencies
inhibit_all_warnings!

target 'deltachat-ios' do
target 'PrivittyChat' do
pod 'SwiftLint'
pod 'SwiftFormat/CLI'
# pod 'openssl-ios-bitcode'
Expand Down
2 changes: 1 addition & 1 deletion Podfile.lock
Original file line number Diff line number Diff line change
Expand Up @@ -78,6 +78,6 @@ SPEC CHECKSUMS:
SwiftFormat: 2f3558ca02842dcd3fd970360d2d4054bd21624a
SwiftLint: 92196976e597b9afec5dbe374810103e6c1d9d7c

PODFILE CHECKSUM: 2da95f11b974320ff49308be31714c4fd2efb4ac
PODFILE CHECKSUM: bb100867393e0578b564a178424fc9af8ead4711

COCOAPODS: 1.16.2
75 changes: 43 additions & 32 deletions deltachat-ios.xcodeproj/project.pbxproj

Large diffs are not rendered by default.

2 changes: 1 addition & 1 deletion deltachat-ios/Assets/Help/help.css
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
body {
font-size: 13pt;
font-family: 'Poppins', -apple-system, sans-serif;
font-family: -apple-system, sans-serif;
padding: 0 .5rem .5rem .5rem;
-webkit-text-size-adjust: none;
}
Expand Down
16 changes: 0 additions & 16 deletions deltachat-ios/Chat/ChatViewController.swift
Original file line number Diff line number Diff line change
Expand Up @@ -42,22 +42,6 @@ class ChatViewController: UITableViewController, UITableViewDropDelegate {
searchController.searchBar.inputAccessoryView = messageInputBar
searchController.searchBar.autocorrectionType = .yes
searchController.searchBar.keyboardType = .default

if #available(iOS 13.0, *) {
let textField = searchController.searchBar.searchTextField
textField.font = UIFont.poppins(forTextStyle: UIFont.TextStyle.body, weight: PoppinsWeight.regular)

if let placeholder = textField.placeholder {
textField.attributedPlaceholder = NSAttributedString(
string: placeholder,
attributes: [
.font: UIFont.poppins(forTextStyle: UIFont.TextStyle.body, weight: PoppinsWeight.regular),
.foregroundColor: UIColor.secondaryLabel
]
)
}
}

return searchController
}()

Expand Down
3 changes: 1 addition & 2 deletions deltachat-ios/Chat/InputBarAccessoryView/InputTextView.swift
Original file line number Diff line number Diff line change
Expand Up @@ -163,8 +163,7 @@ open class InputTextView: UITextView {
open func setup() {

backgroundColor = .clear
// font = UIFont.preferredFont(forTextStyle: .body)
font = UIFont.poppins(forTextStyle: .body, weight: .regular)
font = UIFont.preferredFont(forTextStyle: .body)
isScrollEnabled = false
scrollIndicatorInsets = UIEdgeInsets(top: .leastNonzeroMagnitude,
left: .leastNonzeroMagnitude,
Expand Down
3 changes: 1 addition & 2 deletions deltachat-ios/Chat/Views/AudioPlayerView.swift
Original file line number Diff line number Diff line change
Expand Up @@ -31,8 +31,7 @@ open class AudioPlayerView: UIView {
private lazy var durationLabel: UILabel = {
let durationLabel = UILabel(frame: CGRect.zero)
durationLabel.textAlignment = .right
durationLabel.font = UIFont.poppins(forTextStyle: .body, weight: .regular)
// durationLabel.font = UIFont.preferredFont(forTextStyle: .body)
durationLabel.font = UIFont.preferredFont(forTextStyle: .body)
durationLabel.adjustsFontForContentSizeCategory = true
durationLabel.text = "0:00"
durationLabel.translatesAutoresizingMaskIntoConstraints = false
Expand Down
3 changes: 1 addition & 2 deletions deltachat-ios/Chat/Views/Cells/InfoMessageCell.swift
Original file line number Diff line number Diff line change
Expand Up @@ -103,8 +103,7 @@ class InfoMessageCell: UITableViewCell, ReusableCell {
])

imageHeightConstraint = iconView.constraintHeightTo(0, priority: .required)
imageSize = UIFont.poppins(forTextStyle: .subheadline, weight: .medium).pointSize
// imageSize = UIFont.preferredFont(for: .subheadline, weight: .medium).pointSize
imageSize = UIFont.preferredFont(for: .subheadline, weight: .medium).pointSize
imageHeightConstraint?.isActive = true
trailingConstraint = messageLabel.constraintAlignTrailingMaxTo(contentView, paddingTrailing: 55)
trailingConstraintEditingMode = messageLabel.constraintAlignTrailingMaxTo(contentView, paddingTrailing: 10)
Expand Down
6 changes: 2 additions & 4 deletions deltachat-ios/Chat/Views/Cells/VideoInviteCell.swift
Original file line number Diff line number Diff line change
Expand Up @@ -40,8 +40,7 @@ public class VideoInviteCell: UITableViewCell, ReusableCell {
label.numberOfLines = 0
label.lineBreakMode = .byWordWrapping
label.textAlignment = .center
label.font = UIFont.poppins(.regular, size: 16)
// label.font = UIFont.preferredFont(for: .body, weight: .regular)
label.font = UIFont.preferredFont(for: .body, weight: .regular)
label.textColor = DcColors.systemMessageFontColor
return label
}()
Expand All @@ -52,8 +51,7 @@ public class VideoInviteCell: UITableViewCell, ReusableCell {
label.numberOfLines = 0
label.lineBreakMode = .byWordWrapping
label.textAlignment = .center
label.font = UIFont.poppins(.bold, size: 16)
// label.font = UIFont.preferredFont(for: .body, weight: .bold)
label.font = UIFont.preferredFont(for: .body, weight: .bold)
label.textColor = DcColors.systemMessageFontColor
return label
}()
Expand Down
3 changes: 1 addition & 2 deletions deltachat-ios/Chat/Views/ChatContactRequestBar.swift
Original file line number Diff line number Diff line change
Expand Up @@ -28,8 +28,7 @@ public class ChatContactRequestBar: UIView, InputItem {
private lazy var infoLabel: UILabel = {
let label = UILabel()
label.translatesAutoresizingMaskIntoConstraints = false
label.font = UIFont.poppins(forTextStyle: .body, weight: PoppinsWeight.regular)
// label.font = UIFont.preferredFont(for: .body, weight: .regular)
label.font = UIFont.preferredFont(for: .body, weight: .regular)
label.numberOfLines = 0
label.lineBreakMode = .byWordWrapping
label.textColor = DcColors.defaultInverseColor
Expand Down
6 changes: 2 additions & 4 deletions deltachat-ios/Chat/Views/ContactCardView.swift
Original file line number Diff line number Diff line change
Expand Up @@ -33,8 +33,7 @@ public class ContactCardView: UIView {
label.translatesAutoresizingMaskIntoConstraints = false
label.numberOfLines = 3
label.lineBreakMode = .byCharWrapping
label.font = UIFont.poppins(forTextStyle: .headline)
// label.font = UIFont.preferredFont(forTextStyle: .headline)
label.font = UIFont.preferredFont(forTextStyle: .headline)
isAccessibilityElement = false
return label
}()
Expand All @@ -43,8 +42,7 @@ public class ContactCardView: UIView {
let label = UILabel()
label.translatesAutoresizingMaskIntoConstraints = false
label.numberOfLines = 1
label.font = UIFont.poppins(forTextStyle: .caption2)
// label.font = UIFont.preferredFont(forTextStyle: .caption2)
label.font = UIFont.preferredFont(forTextStyle: .caption2)
isAccessibilityElement = false
return label
}()
Expand Down
12 changes: 4 additions & 8 deletions deltachat-ios/Chat/Views/FileView.swift
Original file line number Diff line number Diff line change
Expand Up @@ -37,8 +37,7 @@ public class FileView: UIView {
private lazy var fileTypeLabel: UILabel = {
let label = UILabel()
label.translatesAutoresizingMaskIntoConstraints = false
label.font = UIFont.poppins(forTextStyle: .caption1, weight: PoppinsWeight.semibold)
// label.font = UIFont.preferredFont(forTextStyle: .caption1)
label.font = UIFont.preferredFont(forTextStyle: .caption1)
label.textColor = .label // Use .label for proper dark mode support
label.text = "Document File"
return label
Expand Down Expand Up @@ -112,8 +111,7 @@ public class FileView: UIView {
lazy var fileTitle: UILabel = {
let label = UILabel()
label.translatesAutoresizingMaskIntoConstraints = false
label.font = UIFont.poppins(forTextStyle: .body, weight: PoppinsWeight.medium)
// label.font = UIFont.preferredFont(forTextStyle: .body)
label.font = UIFont.preferredFont(forTextStyle: .body)
label.numberOfLines = 1
label.lineBreakMode = .byTruncatingMiddle
label.textColor = .label
Expand All @@ -124,8 +122,7 @@ public class FileView: UIView {
private lazy var fileSubtitle: UILabel = {
let label = UILabel()
label.translatesAutoresizingMaskIntoConstraints = false
label.font = UIFont.poppins(forTextStyle: .caption2, weight: PoppinsWeight.regular)
// label.font = UIFont.preferredFont(forTextStyle: .caption2)
label.font = UIFont.preferredFont(forTextStyle: .caption2)
label.numberOfLines = 1
label.textColor = .secondaryLabel
return label
Expand All @@ -135,8 +132,7 @@ public class FileView: UIView {
private lazy var accessUntilLabel: UILabel = {
let label = UILabel()
label.translatesAutoresizingMaskIntoConstraints = false
label.font = UIFont.poppins(forTextStyle: .caption2, weight: PoppinsWeight.regular)
// label.font = UIFont.preferredFont(forTextStyle: .caption2)
label.font = UIFont.preferredFont(forTextStyle: .caption2)
label.textColor = .label // Use .label for proper dark mode support
label.numberOfLines = 1
return label
Expand Down
6 changes: 2 additions & 4 deletions deltachat-ios/Chat/Views/StatusView.swift
Original file line number Diff line number Diff line change
Expand Up @@ -15,14 +15,12 @@ public class StatusView: UIView {

dateLabel = UILabel()
dateLabel.translatesAutoresizingMaskIntoConstraints = false
dateLabel.font = UIFont.poppins(forTextStyle: .caption1, weight: .regular)
// dateLabel.font = UIFont.preferredFont(for: .caption1, weight: .regular)
dateLabel.font = UIFont.preferredFont(for: .caption1, weight: .regular)

editedLabel = UILabel()
editedLabel.text = String.localized("edited")
editedLabel.translatesAutoresizingMaskIntoConstraints = false
editedLabel.font = UIFont.poppins(forTextStyle: .caption1, weight: .regular)
// editedLabel.font = UIFont.preferredFont(for: .caption1, weight: .regular)
editedLabel.font = UIFont.preferredFont(for: .caption1, weight: .regular)

envelopeView = UIImageView()
envelopeView.translatesAutoresizingMaskIntoConstraints = false
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -45,12 +45,11 @@ class InstantOnboardingView: UIView {
nameTextField.translatesAutoresizingMaskIntoConstraints = false
nameTextField.placeholder = String.localized("pref_your_name")
nameTextField.borderStyle = .roundedRect
nameTextField.font = UIFont.poppins(forTextStyle: .body, weight: .regular)

hintLabel = UILabel()
hintLabel.translatesAutoresizingMaskIntoConstraints = false
hintLabel.numberOfLines = 0
hintLabel.font = UIFont.poppins(forTextStyle: .subheadline, weight: .regular)
hintLabel.font = UIFont.preferredFont(forTextStyle: .subheadline)
hintLabel.text = String.localized("set_name_and_avatar_explain")

hintLabelWrapper = UIView()
Expand All @@ -59,22 +58,21 @@ class InstantOnboardingView: UIView {

agreeButton = UIButton()
agreeButton.setTitle(String.localized("instant_onboarding_create"), for: .normal)
agreeButton.titleLabel?.font = UIFont.poppins(forTextStyle: .headline, weight: .semibold)
agreeButton.titleLabel?.font = UIFont.preferredFont(forTextStyle: .body)
agreeButton.setTitleColor(.white, for: .normal)
agreeButton.translatesAutoresizingMaskIntoConstraints = false
agreeButton.layer.cornerRadius = 5
agreeButton.contentEdgeInsets = UIEdgeInsets(top: 8, left: 15, bottom: 8, right: 15)

privacyButton = UIButton(type: .system)
privacyButton.translatesAutoresizingMaskIntoConstraints = false
privacyButton.titleLabel?.font = UIFont.poppins(forTextStyle: .body, weight: .regular)
privacyButtonWrapper = UIView()
privacyButtonWrapper.translatesAutoresizingMaskIntoConstraints = false
privacyButtonWrapper.addSubview(privacyButton)

otherOptionsButton = UIButton(type: .system)
otherOptionsButton.setTitle(String.localized("instant_onboarding_show_more_instances"), for: .normal)
otherOptionsButton.titleLabel?.font = UIFont.poppins(forTextStyle: .body, weight: .medium)
otherOptionsButton.titleLabel?.font = UIFont.preferredFont(forTextStyle: .body)
otherOptionsButton.translatesAutoresizingMaskIntoConstraints = false

contentStackView = UIStackView(arrangedSubviews: [imageButton, nameTextField, hintLabelWrapper, privacyButtonWrapper, agreeButton, otherOptionsButton])
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -380,7 +380,7 @@ class WelcomeContentView: UIView {
label.text = "Welcome to"
label.textAlignment = .center
label.numberOfLines = 1
label.font = UIFont.poppins(.medium, size: 47) // label.font = AppFont.medium(size: 47) // Android: 47sp
label.font = AppFont.medium(size: 47) // Android: 47sp
label.textColor = UIColor(hexString: "020202") // Black
label.translatesAutoresizingMaskIntoConstraints = false
return label
Expand Down Expand Up @@ -409,8 +409,7 @@ class WelcomeContentView: UIView {
label.text = "Privitty"
label.textAlignment = .center
label.numberOfLines = 1
label.font = UIFont.poppins(.medium, size: 45)
// label.font = AppFont.medium(size: 45) // Android: 45sp
label.font = AppFont.medium(size: 45) // Android: 45sp
label.textColor = UIColor(hexString: "6750A4") // Purple
label.translatesAutoresizingMaskIntoConstraints = false
return label
Expand All @@ -434,7 +433,7 @@ class WelcomeContentView: UIView {
label.attributedText = NSAttributedString(
string: text,
attributes: [
.font: UIFont.poppins(.regular, size: 18),
.font: AppFont.regular(size: 18), // Slightly smaller for better spacing
.foregroundColor: UIColor(hexString: "4F4F4F"), // secondary_message color
.paragraphStyle: paragraphStyle
]
Expand All @@ -447,7 +446,7 @@ class WelcomeContentView: UIView {
let button = UIButton(type: .system)
let title = String.localized("onboarding_create_instant_account")
button.setTitle(title, for: .normal)
button.titleLabel?.font = UIFont.poppins(.medium, size: 16)
button.titleLabel?.font = AppFont.medium(size: 16)
button.setTitleColor(UIColor(hexString: "F6F6F6"), for: .normal) // White
button.backgroundColor = UIColor(hexString: "6750A4") // Figma: #6750A4
button.layer.cornerRadius = 30 // Height 60 / 2 = fully rounded
Expand All @@ -461,7 +460,7 @@ class WelcomeContentView: UIView {
let button = UIButton(type: .system)
let title = String.localized("onboarding_alternative_logins")
button.setTitle(title, for: .normal)
button.titleLabel?.font = UIFont.poppins(.medium, size: 16)
button.titleLabel?.font = AppFont.medium(size: 16)
button.setTitleColor(UIColor(hexString: "020202"), for: .normal) // Black
button.backgroundColor = UIColor(hexString: "F8F5FF") // Match bottom sheet
button.layer.cornerRadius = 30
Expand Down
4 changes: 2 additions & 2 deletions deltachat-ios/Controller/AllMediaViewController.swift
Original file line number Diff line number Diff line change
Expand Up @@ -214,13 +214,13 @@ final class AllMediaViewController: UIPageViewController {

let normalTextAttributes: [NSAttributedString.Key: Any] = [
.foregroundColor: DcColors.defaultInverseColor,
.font: UIFont.poppins(PoppinsWeight.medium, size: 14)
.font: AppFont.medium(size: 14)
]
control.setTitleTextAttributes(normalTextAttributes, for: .normal)

let selectedTextAttributes: [NSAttributedString.Key: Any] = [
.foregroundColor: DcColors.defaultBackgroundColor,
.font: UIFont.poppins(PoppinsWeight.medium, size: 14)
.font: AppFont.medium(size: 14)
]
control.setTitleTextAttributes(selectedTextAttributes, for: .selected)

Expand Down
4 changes: 2 additions & 2 deletions deltachat-ios/Controller/BackupTransferViewController.swift
Original file line number Diff line number Diff line change
Expand Up @@ -46,8 +46,7 @@ class BackupTransferViewController: UIViewController {
statusLine.textAlignment = .center
statusLine.numberOfLines = 0
statusLine.lineBreakMode = .byWordWrapping
statusLine.font = UIFont.poppins(forTextStyle: UIFont.TextStyle.body, weight: PoppinsWeight.regular)
statusLine.adjustsFontForContentSizeCategory = true
statusLine.font = .preferredFont(forTextStyle: .body)

qrContentView = UIImageView()
qrContentView.contentMode = .scaleAspectFit
Expand All @@ -69,6 +68,7 @@ class BackupTransferViewController: UIViewController {

view.addSubview(contentScrollView)
view.addSubview(activityIndicator)
view.backgroundColor = DcColors.defaultBackgroundColor

setupSubviews()

Expand Down
18 changes: 0 additions & 18 deletions deltachat-ios/Controller/ChatListViewController.swift
Original file line number Diff line number Diff line change
Expand Up @@ -29,22 +29,6 @@ class ChatListViewController: UITableViewController {
let searchController = UISearchController(searchResultsController: nil)
searchController.obscuresBackgroundDuringPresentation = false
searchController.searchBar.placeholder = String.localized("search")

if #available(iOS 13.0, *) {
let textField = searchController.searchBar.searchTextField
textField.font = UIFont.poppins(forTextStyle: UIFont.TextStyle.body, weight: PoppinsWeight.regular)

if let placeholder = textField.placeholder {
textField.attributedPlaceholder = NSAttributedString(
string: placeholder,
attributes: [
.font: UIFont.poppins(forTextStyle: UIFont.TextStyle.body, weight: PoppinsWeight.regular),
.foregroundColor: UIColor.secondaryLabel
]
)
}
}

return searchController
}()

Expand Down Expand Up @@ -330,7 +314,6 @@ class ChatListViewController: UITableViewController {
tableView.register(ContactCell.self, forCellReuseIdentifier: ContactCell.reuseIdentifier)
tableView.rowHeight = ContactCell.cellHeight
tableView.allowsMultipleSelectionDuringEditing = true
tableView.backgroundColor = DcColors.chatBackgroundColor
}

private var isInitial = true
Expand Down Expand Up @@ -424,7 +407,6 @@ class ChatListViewController: UITableViewController {
}
// Update background color for theme changes
self.view.backgroundColor = DcColors.chatBackgroundColor
self.tableView.backgroundColor = DcColors.chatBackgroundColor
}

func quitSearch(animated: Bool) {
Expand Down
5 changes: 2 additions & 3 deletions deltachat-ios/Controller/ConnectivityViewController.swift
Original file line number Diff line number Diff line change
Expand Up @@ -116,8 +116,7 @@ final class ConnectivityViewController: WebViewViewController {
appearance.configureWithOpaqueBackground()
appearance.backgroundColor = DcColors.chatBackgroundColor
appearance.titleTextAttributes = [
.foregroundColor: DcColors.defaultInverseColor,
.font: UIFont.poppins(PoppinsWeight.semibold, size: 17)
.foregroundColor: DcColors.defaultInverseColor
]

navigationController?.navigationBar.standardAppearance = appearance
Expand Down Expand Up @@ -156,7 +155,7 @@ final class ConnectivityViewController: WebViewViewController {
"""
body {
font-size: 13pt;
font-family: 'Poppins', -apple-system, BlinkMacSystemFont, sans-serif;
font-family: -apple-system, BlinkMacSystemFont, sans-serif;
padding: 0 .5rem .5rem .5rem;
-webkit-text-size-adjust: none;
background-color: transparent;
Expand Down
Loading
Loading