mirror of
https://github.com/yattee/yattee.git
synced 2026-05-14 03:15:03 +00:00
Make sources list feel native on macOS
Drop the iOS-grouped rounded card, per-row chevron, and oversized metrics on macOS. Use tighter padding, smaller icon/title fonts, uppercase section headers, and top/bottom dividers so the list reads like a native grouped Mac list. Force .buttonStyle(.plain) on row buttons/NavigationLinks and add .contentShape(Rectangle()) so the full row is hit-testable without picking up macOS's default link styling. iOS and tvOS unchanged.
This commit is contained in:
@@ -17,13 +17,25 @@ struct SourceListRow<Content: View>: View {
|
||||
@ViewBuilder let content: () -> Content
|
||||
|
||||
/// Horizontal padding for row content.
|
||||
#if os(macOS)
|
||||
private let horizontalPadding: CGFloat = 12
|
||||
#else
|
||||
private let horizontalPadding: CGFloat = 16
|
||||
#endif
|
||||
|
||||
/// Vertical padding for row content.
|
||||
#if os(macOS)
|
||||
private let verticalPadding: CGFloat = 8
|
||||
#else
|
||||
private let verticalPadding: CGFloat = 12
|
||||
#endif
|
||||
|
||||
/// Width of the icon column.
|
||||
#if os(macOS)
|
||||
private let iconWidth: CGFloat = 24
|
||||
#else
|
||||
private let iconWidth: CGFloat = 32
|
||||
#endif
|
||||
|
||||
/// Spacing between icon and text.
|
||||
private let iconTextSpacing: CGFloat = 12
|
||||
|
||||
Reference in New Issue
Block a user