mirror of
https://github.com/Ranchero-Software/NetNewsWire.git
synced 2024-12-27 01:52:30 +01:00
Layout sidebar items differently on macOS and iOS due to rendering differences in the platforms
This commit is contained in:
parent
8d6d7b94cc
commit
cf8c6f5e8e
@ -16,17 +16,31 @@ struct SidebarItemView: View {
|
||||
var sidebarItem: SidebarItem
|
||||
|
||||
var body: some View {
|
||||
HStack(alignment: .top) {
|
||||
if let image = feedIconImageLoader.image {
|
||||
IconImageView(iconImage: image)
|
||||
.frame(width: 20, height: 20, alignment: .center)
|
||||
HStack {
|
||||
#if os(macOS)
|
||||
HStack {
|
||||
if let image = feedIconImageLoader.image {
|
||||
IconImageView(iconImage: image)
|
||||
.frame(width: 20, height: 20, alignment: .center)
|
||||
}
|
||||
Text(verbatim: sidebarItem.nameForDisplay)
|
||||
Spacer()
|
||||
if sidebarItem.unreadCount > 0 {
|
||||
UnreadCountView(count: sidebarItem.unreadCount)
|
||||
}
|
||||
}
|
||||
#else
|
||||
HStack(alignment: .top) {
|
||||
if let image = feedIconImageLoader.image {
|
||||
IconImageView(iconImage: image)
|
||||
.frame(width: 20, height: 20)
|
||||
}
|
||||
Text(verbatim: sidebarItem.nameForDisplay)
|
||||
}
|
||||
Text(verbatim: sidebarItem.nameForDisplay)
|
||||
Spacer()
|
||||
if sidebarItem.unreadCount > 0 {
|
||||
UnreadCountView(count: sidebarItem.unreadCount)
|
||||
}
|
||||
#if os(iOS)
|
||||
if sidebarItem.representedType == .webFeed || sidebarItem.representedType == .pseudoFeed {
|
||||
Spacer()
|
||||
.frame(width: 16)
|
||||
|
Loading…
Reference in New Issue
Block a user