Skip to content

Commit

Permalink
Use outline icons for mac and ipad
Browse files Browse the repository at this point in the history
  • Loading branch information
LaurentTreguier committed Jul 14, 2024
1 parent dedae6b commit c964827
Show file tree
Hide file tree
Showing 2 changed files with 13 additions and 7 deletions.
12 changes: 6 additions & 6 deletions Fyreplace/Views/Navigation/Destination.swift
Original file line number Diff line number Diff line change
Expand Up @@ -30,17 +30,17 @@ enum Destination: String, CaseIterable, Identifiable {
var icon: String {
switch self {
case .feed:
"house.fill"
"house"
case .notifications:
"bell.fill"
"bell"
case .archive:
"bookmark.fill"
"bookmark"
case .drafts:
"doc.text.fill"
"doc.text"
case .published:
"archivebox.fill"
"archivebox"
case .settings:
"person.crop.circle.fill"
"person.crop.circle"
}
}
}
8 changes: 7 additions & 1 deletion Fyreplace/Views/Navigation/Label+Destination.swift
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,12 @@ import SwiftUI

extension Label where Title == Text, Icon == Image {
init(_ destination: Destination) {
self.init(destination.titleKey, systemImage: destination.icon)
#if os(macOS)
let iconSuffix = ""
#else
let iconSuffix = UIDevice.current.userInterfaceIdiom == .phone ? ".fill" : ""
#endif

self.init(destination.titleKey, systemImage: destination.icon + iconSuffix)
}
}

0 comments on commit c964827

Please sign in to comment.