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
4 changes: 4 additions & 0 deletions deltachat-ios.xcodeproj/project.pbxproj
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,7 @@
0D481EC62ED3EEF700CFB244 /* poppins_semibold.ttf in Resources */ = {isa = PBXBuildFile; fileRef = 0D481EC32ED3EEF700CFB244 /* poppins_semibold.ttf */; };
0D481EC72ED3EEF700CFB244 /* poppins_regular.ttf in Resources */ = {isa = PBXBuildFile; fileRef = 0D481EC22ED3EEF700CFB244 /* poppins_regular.ttf */; };
0D481EC92ED3F1EB00CFB244 /* AppFont.swift in Sources */ = {isa = PBXBuildFile; fileRef = 0D481EC82ED3F1EB00CFB244 /* AppFont.swift */; };
F00DABCD1234567890ABCDE0 /* UIFont+Poppins.swift in Sources */ = {isa = PBXBuildFile; fileRef = F00DABCD1234567890ABCDEF /* UIFont+Poppins.swift */; };
0DACEEFC2EE47A7400043D27 /* ContentDetailsViewController.swift in Sources */ = {isa = PBXBuildFile; fileRef = 0DACEEFB2EE47A7400043D27 /* ContentDetailsViewController.swift */; };
0DACEF672EE4A7C600043D27 /* ContentDetailsViewController.swift in Sources */ = {isa = PBXBuildFile; fileRef = 0DACEF662EE4A7C600043D27 /* ContentDetailsViewController.swift */; };
21D54500299415B9008B54D5 /* Character+Extentions.swift in Sources */ = {isa = PBXBuildFile; fileRef = 21D544FF299415B9008B54D5 /* Character+Extentions.swift */; };
Expand Down Expand Up @@ -329,6 +330,7 @@
0D481EC22ED3EEF700CFB244 /* poppins_regular.ttf */ = {isa = PBXFileReference; lastKnownFileType = file; path = poppins_regular.ttf; sourceTree = "<group>"; };
0D481EC32ED3EEF700CFB244 /* poppins_semibold.ttf */ = {isa = PBXFileReference; lastKnownFileType = file; path = poppins_semibold.ttf; sourceTree = "<group>"; };
0D481EC82ED3F1EB00CFB244 /* AppFont.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = AppFont.swift; sourceTree = "<group>"; };
F00DABCD1234567890ABCDEF /* UIFont+Poppins.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = "UIFont+Poppins.swift"; sourceTree = "<group>"; };
0DACEEFB2EE47A7400043D27 /* ContentDetailsViewController.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = ContentDetailsViewController.swift; sourceTree = "<group>"; };
0DACEF662EE4A7C600043D27 /* ContentDetailsViewController.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = ContentDetailsViewController.swift; sourceTree = "<group>"; };
0EEC8C8D7C6F411BA7A449DE /* Pods-deltachat-ios.debug.xcconfig */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text.xcconfig; name = "Pods-deltachat-ios.debug.xcconfig"; path = "Target Support Files/Pods-deltachat-ios/Pods-deltachat-ios.debug.xcconfig"; sourceTree = "<group>"; };
Expand Down Expand Up @@ -843,6 +845,7 @@
6430531C2DF0668600E26D1F /* NSItemProvider+Extensions.swift */,
5F4945AA2D315E7000DCD50A /* UIPasteboard.swift */,
C330030B2EB8D3E100A1AEDE /* UITableViewCell+Extension.swift */,
F00DABCD1234567890ABCDEF /* UIFont+Poppins.swift */,
);
path = Extensions;
sourceTree = "<group>";
Expand Down Expand Up @@ -1903,6 +1906,7 @@
D8E426D82D423FCF0078C735 /* DownloadingActivityView.swift in Sources */,
AEFBE22F23FEF23D0045327A /* ProviderInfoCell.swift in Sources */,
C330030C2EB8D3E100A1AEDE /* UITableViewCell+Extension.swift in Sources */,
F00DABCD1234567890ABCDE0 /* UIFont+Poppins.swift in Sources */,
AE6EC5242497663200A400E4 /* UIImageView+Extensions.swift in Sources */,
30F8817624DA97DA0023780E /* BackgroundContainer.swift in Sources */,
3067AA4C2666310E00525036 /* ChatInputTextView.swift in Sources */,
Expand Down
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: -apple-system, sans-serif;
font-family: 'Poppins', -apple-system, sans-serif;
padding: 0 .5rem .5rem .5rem;
-webkit-text-size-adjust: none;
}
Expand Down
16 changes: 16 additions & 0 deletions deltachat-ios/Chat/ChatViewController.swift
Original file line number Diff line number Diff line change
Expand Up @@ -42,6 +42,22 @@
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 Expand Up @@ -1546,7 +1562,7 @@
}

private func sendPrivittyHandshake() {
let chat = dcContext.getChat(chatId: chatId)

Check warning on line 1565 in deltachat-ios/Chat/ChatViewController.swift

View workflow job for this annotation

GitHub Actions / build

initialization of immutable value 'chat' was never used; consider replacing with assignment to '_' or removing it

logger.info("Initiating Privitty handshake for chat: \(chatId)")

Expand Down Expand Up @@ -3840,4 +3856,4 @@
focusInputTextView()
FileHelper.deleteFileAsync(atPath: url.relativePath)
}
}

Check warning on line 3859 in deltachat-ios/Chat/ChatViewController.swift

View workflow job for this annotation

GitHub Actions / build

File Length Violation: File should contain 2000 lines or less excluding comments and whitespaces: currently contains 2473 (file_length)
3 changes: 2 additions & 1 deletion deltachat-ios/Chat/InputBarAccessoryView/InputTextView.swift
Original file line number Diff line number Diff line change
Expand Up @@ -163,7 +163,8 @@ open class InputTextView: UITextView {
open func setup() {

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

imageHeightConstraint = iconView.constraintHeightTo(0, priority: .required)
imageSize = UIFont.preferredFont(for: .subheadline, weight: .medium).pointSize
imageSize = UIFont.poppins(forTextStyle: .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: 4 additions & 2 deletions deltachat-ios/Chat/Views/Cells/VideoInviteCell.swift
Original file line number Diff line number Diff line change
Expand Up @@ -40,7 +40,8 @@ public class VideoInviteCell: UITableViewCell, ReusableCell {
label.numberOfLines = 0
label.lineBreakMode = .byWordWrapping
label.textAlignment = .center
label.font = UIFont.preferredFont(for: .body, weight: .regular)
label.font = UIFont.poppins(.regular, size: 16)
// label.font = UIFont.preferredFont(for: .body, weight: .regular)
label.textColor = DcColors.systemMessageFontColor
return label
}()
Expand All @@ -51,7 +52,8 @@ public class VideoInviteCell: UITableViewCell, ReusableCell {
label.numberOfLines = 0
label.lineBreakMode = .byWordWrapping
label.textAlignment = .center
label.font = UIFont.preferredFont(for: .body, weight: .bold)
label.font = UIFont.poppins(.bold, size: 16)
// label.font = UIFont.preferredFont(for: .body, weight: .bold)
label.textColor = DcColors.systemMessageFontColor
return label
}()
Expand Down
3 changes: 2 additions & 1 deletion deltachat-ios/Chat/Views/ChatContactRequestBar.swift
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,8 @@ public class ChatContactRequestBar: UIView, InputItem {
private lazy var infoLabel: UILabel = {
let label = UILabel()
label.translatesAutoresizingMaskIntoConstraints = false
label.font = UIFont.preferredFont(for: .body, weight: .regular)
label.font = UIFont.poppins(forTextStyle: .body, weight: PoppinsWeight.regular)
// label.font = UIFont.preferredFont(for: .body, weight: .regular)
label.numberOfLines = 0
label.lineBreakMode = .byWordWrapping
label.textColor = DcColors.defaultInverseColor
Expand Down
6 changes: 4 additions & 2 deletions deltachat-ios/Chat/Views/ContactCardView.swift
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,8 @@ public class ContactCardView: UIView {
label.translatesAutoresizingMaskIntoConstraints = false
label.numberOfLines = 3
label.lineBreakMode = .byCharWrapping
label.font = UIFont.preferredFont(forTextStyle: .headline)
label.font = UIFont.poppins(forTextStyle: .headline)
// label.font = UIFont.preferredFont(forTextStyle: .headline)
isAccessibilityElement = false
return label
}()
Expand All @@ -42,7 +43,8 @@ public class ContactCardView: UIView {
let label = UILabel()
label.translatesAutoresizingMaskIntoConstraints = false
label.numberOfLines = 1
label.font = UIFont.preferredFont(forTextStyle: .caption2)
label.font = UIFont.poppins(forTextStyle: .caption2)
// label.font = UIFont.preferredFont(forTextStyle: .caption2)
isAccessibilityElement = false
return label
}()
Expand Down
12 changes: 8 additions & 4 deletions deltachat-ios/Chat/Views/FileView.swift
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@
get {
return true // Always horizontal for new design
}
set {

Check warning on line 18 in deltachat-ios/Chat/Views/FileView.swift

View workflow job for this annotation

GitHub Actions / build

Unused Setter Value Violation: Setter value is not used (unused_setter_value)
// Kept for compatibility, but ignored
}
}
Expand All @@ -37,7 +37,8 @@
private lazy var fileTypeLabel: UILabel = {
let label = UILabel()
label.translatesAutoresizingMaskIntoConstraints = false
label.font = UIFont.preferredFont(forTextStyle: .caption1)
label.font = UIFont.poppins(forTextStyle: .caption1, weight: PoppinsWeight.semibold)
// 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 @@ -111,7 +112,8 @@
lazy var fileTitle: UILabel = {
let label = UILabel()
label.translatesAutoresizingMaskIntoConstraints = false
label.font = UIFont.preferredFont(forTextStyle: .body)
label.font = UIFont.poppins(forTextStyle: .body, weight: PoppinsWeight.medium)
// label.font = UIFont.preferredFont(forTextStyle: .body)
label.numberOfLines = 1
label.lineBreakMode = .byTruncatingMiddle
label.textColor = .label
Expand All @@ -122,7 +124,8 @@
private lazy var fileSubtitle: UILabel = {
let label = UILabel()
label.translatesAutoresizingMaskIntoConstraints = false
label.font = UIFont.preferredFont(forTextStyle: .caption2)
label.font = UIFont.poppins(forTextStyle: .caption2, weight: PoppinsWeight.regular)
// label.font = UIFont.preferredFont(forTextStyle: .caption2)
label.numberOfLines = 1
label.textColor = .secondaryLabel
return label
Expand All @@ -132,7 +135,8 @@
private lazy var accessUntilLabel: UILabel = {
let label = UILabel()
label.translatesAutoresizingMaskIntoConstraints = false
label.font = UIFont.preferredFont(forTextStyle: .caption2)
label.font = UIFont.poppins(forTextStyle: .caption2, weight: PoppinsWeight.regular)
// 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: 4 additions & 2 deletions deltachat-ios/Chat/Views/StatusView.swift
Original file line number Diff line number Diff line change
Expand Up @@ -15,12 +15,14 @@ public class StatusView: UIView {

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

editedLabel = UILabel()
editedLabel.text = String.localized("edited")
editedLabel.translatesAutoresizingMaskIntoConstraints = false
editedLabel.font = UIFont.preferredFont(for: .caption1, weight: .regular)
editedLabel.font = UIFont.poppins(forTextStyle: .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,11 +45,12 @@ 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.preferredFont(forTextStyle: .subheadline)
hintLabel.font = UIFont.poppins(forTextStyle: .subheadline, weight: .regular)
hintLabel.text = String.localized("set_name_and_avatar_explain")

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

agreeButton = UIButton()
agreeButton.setTitle(String.localized("instant_onboarding_create"), for: .normal)
agreeButton.titleLabel?.font = UIFont.preferredFont(forTextStyle: .body)
agreeButton.titleLabel?.font = UIFont.poppins(forTextStyle: .headline, weight: .semibold)
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.preferredFont(forTextStyle: .body)
otherOptionsButton.titleLabel?.font = UIFont.poppins(forTextStyle: .body, weight: .medium)
otherOptionsButton.translatesAutoresizingMaskIntoConstraints = false

contentStackView = UIStackView(arrangedSubviews: [imageButton, nameTextField, hintLabelWrapper, privacyButtonWrapper, agreeButton, otherOptionsButton])
Expand All @@ -92,8 +94,10 @@ class InstantOnboardingView: UIView {
contentScrollView.keyboardDismissMode = .onDrag

super.init(frame: .zero)

backgroundColor = DcColors.chatBackgroundColor
contentScrollView.backgroundColor = DcColors.chatBackgroundColor

backgroundColor = .systemBackground
nameTextField.backgroundColor = .secondarySystemBackground

addSubview(contentScrollView)
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -374,7 +374,7 @@ class WelcomeContentView: UIView {
label.text = "Welcome to"
label.textAlignment = .center
label.numberOfLines = 1
label.font = AppFont.medium(size: 47) // Android: 47sp
label.font = UIFont.poppins(.medium, size: 47) // label.font = AppFont.medium(size: 47) // Android: 47sp
label.textColor = UIColor(hexString: "020202") // Black
label.translatesAutoresizingMaskIntoConstraints = false
return label
Expand Down Expand Up @@ -403,7 +403,8 @@ class WelcomeContentView: UIView {
label.text = "Privitty"
label.textAlignment = .center
label.numberOfLines = 1
label.font = AppFont.medium(size: 45) // Android: 45sp
label.font = UIFont.poppins(.medium, size: 45)
// label.font = AppFont.medium(size: 45) // Android: 45sp
label.textColor = UIColor(hexString: "6750A4") // Purple
label.translatesAutoresizingMaskIntoConstraints = false
return label
Expand All @@ -427,7 +428,7 @@ class WelcomeContentView: UIView {
label.attributedText = NSAttributedString(
string: text,
attributes: [
.font: AppFont.regular(size: 18), // Slightly smaller for better spacing
.font: UIFont.poppins(.regular, size: 18),
.foregroundColor: UIColor(hexString: "4F4F4F"), // secondary_message color
.paragraphStyle: paragraphStyle
]
Expand All @@ -440,7 +441,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 = AppFont.medium(size: 16)
button.titleLabel?.font = UIFont.poppins(.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 @@ -454,7 +455,7 @@ class WelcomeContentView: UIView {
let button = UIButton(type: .system)
let title = String.localized("onboarding_alternative_logins")
button.setTitle(title, for: .normal)
button.titleLabel?.font = AppFont.medium(size: 16)
button.titleLabel?.font = UIFont.poppins(.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
Loading
Loading