Various fixes

This commit is contained in:
Thomas Ricouard 2024-02-06 19:19:53 +01:00
parent a0e022b8de
commit 3020d831e4
4 changed files with 18 additions and 11 deletions

View file

@ -254,7 +254,11 @@ public struct AccountDetailView: View {
StatusRowView(viewModel: .init(status: status, client: client, routerPath: routerPath)) StatusRowView(viewModel: .init(status: status, client: client, routerPath: routerPath))
} }
Rectangle() Rectangle()
#if os(visionOS)
.fill(Color.clear)
#else
.fill(theme.secondaryBackgroundColor) .fill(theme.secondaryBackgroundColor)
#endif
.frame(height: 12) .frame(height: 12)
.listRowInsets(.init()) .listRowInsets(.init())
.listRowSeparator(.hidden) .listRowSeparator(.hidden)

View file

@ -52,7 +52,7 @@ import SwiftUI
@AppStorage("collapse-long-posts") public var collapseLongPosts = true @AppStorage("collapse-long-posts") public var collapseLongPosts = true
@AppStorage("share-button-behavior") public var shareButtonBehavior: PreferredShareButtonBehavior = .linkAndText @AppStorage("share-button-behavior") public var shareButtonBehavior: PreferredShareButtonBehavior = .linkOnly
@AppStorage("fast_refresh") public var fastRefreshEnabled: Bool = false @AppStorage("fast_refresh") public var fastRefreshEnabled: Bool = false

View file

@ -83,6 +83,8 @@ public struct StatusesListView<Fetcher>: View where Fetcher: StatusesFetcher {
Spacer() Spacer()
} }
.padding(.horizontal, .layoutPadding) .padding(.horizontal, .layoutPadding)
#if !os(visionOS)
.listRowBackground(theme.primaryBackgroundColor) .listRowBackground(theme.primaryBackgroundColor)
#endif
} }
} }

View file

@ -143,6 +143,10 @@ struct StatusRowActionsView: View {
case .linkOnly: case .linkOnly:
ShareLink(item: url) { ShareLink(item: url) {
action.image(dataController: statusDataController) action.image(dataController: statusDataController)
.foregroundColor(Color(UIColor.secondaryLabel))
.padding(.vertical, 6)
.padding(.horizontal, 8)
.contentShape(Rectangle())
#if targetEnvironment(macCatalyst) #if targetEnvironment(macCatalyst)
.font(.scaledBody) .font(.scaledBody)
#else #else
@ -150,12 +154,8 @@ struct StatusRowActionsView: View {
.dynamicTypeSize(.large) .dynamicTypeSize(.large)
#endif #endif
} }
.padding(.vertical, 6)
.padding(.horizontal, 8)
#if os(visionOS)
.buttonStyle(.borderless) .buttonStyle(.borderless)
#else #if !os(visionOS)
.buttonStyle(.statusAction())
.offset(x: -8) .offset(x: -8)
#endif #endif
.accessibilityElement(children: .combine) .accessibilityElement(children: .combine)
@ -166,6 +166,10 @@ struct StatusRowActionsView: View {
message: Text(viewModel.finalStatus.content.asRawText)) message: Text(viewModel.finalStatus.content.asRawText))
{ {
action.image(dataController: statusDataController) action.image(dataController: statusDataController)
.foregroundColor(Color(UIColor.secondaryLabel))
.padding(.vertical, 6)
.padding(.horizontal, 8)
.contentShape(Rectangle())
#if targetEnvironment(macCatalyst) #if targetEnvironment(macCatalyst)
.font(.scaledBody) .font(.scaledBody)
#else #else
@ -173,12 +177,8 @@ struct StatusRowActionsView: View {
.dynamicTypeSize(.large) .dynamicTypeSize(.large)
#endif #endif
} }
.padding(.vertical, 6)
.padding(.horizontal, 8)
#if os(visionOS)
.buttonStyle(.borderless) .buttonStyle(.borderless)
#else #if !os(visionOS)
.buttonStyle(.statusAction())
.offset(x: -8) .offset(x: -8)
#endif #endif
.accessibilityElement(children: .combine) .accessibilityElement(children: .combine)
@ -270,6 +270,7 @@ struct StatusRowActionsView: View {
} }
#if os(visionOS) #if os(visionOS)
.buttonStyle(.borderless) .buttonStyle(.borderless)
.foregroundColor(Color(UIColor.secondaryLabel))
#else #else
.buttonStyle( .buttonStyle(
.statusAction( .statusAction(