mirror of
https://github.com/Ranchero-Software/NetNewsWire.git
synced 2024-12-28 10:30:14 +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,7 +16,9 @@ struct SidebarItemView: View {
|
|||||||
var sidebarItem: SidebarItem
|
var sidebarItem: SidebarItem
|
||||||
|
|
||||||
var body: some View {
|
var body: some View {
|
||||||
HStack(alignment: .top) {
|
HStack {
|
||||||
|
#if os(macOS)
|
||||||
|
HStack {
|
||||||
if let image = feedIconImageLoader.image {
|
if let image = feedIconImageLoader.image {
|
||||||
IconImageView(iconImage: image)
|
IconImageView(iconImage: image)
|
||||||
.frame(width: 20, height: 20, alignment: .center)
|
.frame(width: 20, height: 20, alignment: .center)
|
||||||
@ -26,7 +28,19 @@ struct SidebarItemView: View {
|
|||||||
if sidebarItem.unreadCount > 0 {
|
if sidebarItem.unreadCount > 0 {
|
||||||
UnreadCountView(count: sidebarItem.unreadCount)
|
UnreadCountView(count: sidebarItem.unreadCount)
|
||||||
}
|
}
|
||||||
#if os(iOS)
|
}
|
||||||
|
#else
|
||||||
|
HStack(alignment: .top) {
|
||||||
|
if let image = feedIconImageLoader.image {
|
||||||
|
IconImageView(iconImage: image)
|
||||||
|
.frame(width: 20, height: 20)
|
||||||
|
}
|
||||||
|
Text(verbatim: sidebarItem.nameForDisplay)
|
||||||
|
}
|
||||||
|
Spacer()
|
||||||
|
if sidebarItem.unreadCount > 0 {
|
||||||
|
UnreadCountView(count: sidebarItem.unreadCount)
|
||||||
|
}
|
||||||
if sidebarItem.representedType == .webFeed || sidebarItem.representedType == .pseudoFeed {
|
if sidebarItem.representedType == .webFeed || sidebarItem.representedType == .pseudoFeed {
|
||||||
Spacer()
|
Spacer()
|
||||||
.frame(width: 16)
|
.frame(width: 16)
|
||||||
|
Loading…
Reference in New Issue
Block a user