Various visionOS fixes

This commit is contained in:
Thomas Ricouard 2024-02-06 09:15:22 +01:00
parent 75bb4f43dd
commit f14ca6e529
2 changed files with 15 additions and 0 deletions

View file

@ -137,6 +137,12 @@ extension StatusEditor {
.environment(\.isModal, true) .environment(\.isModal, true)
.padding(.horizontal, .layoutPadding) .padding(.horizontal, .layoutPadding)
.padding(.vertical, .statusComponentSpacing) .padding(.vertical, .statusComponentSpacing)
#if os(visionOS)
.background(RoundedRectangle(cornerRadius: 8)
.foregroundStyle(.background))
.buttonStyle(.plain)
.padding(.layoutPadding)
#endif
} else if let status = viewModel.embeddedStatus { } else if let status = viewModel.embeddedStatus {
StatusEmbeddedView(status: status, client: client, routerPath: RouterPath()) StatusEmbeddedView(status: status, client: client, routerPath: RouterPath())

View file

@ -85,6 +85,9 @@ public struct StatusRowMediaPreviewView: View {
tabAction(for: index) tabAction(for: index)
} }
} }
#if os(visionOS)
.hoverEffect()
#endif
} }
} }
@ -275,6 +278,9 @@ struct AltTextButton: View {
.buttonStyle(.borderless) .buttonStyle(.borderless)
.padding(EdgeInsets(top: 5, leading: 7, bottom: 5, trailing: 7)) .padding(EdgeInsets(top: 5, leading: 7, bottom: 5, trailing: 7))
.background(.thinMaterial) .background(.thinMaterial)
#if os(visionOS)
.clipShape(Capsule())
#endif
.cornerRadius(4) .cornerRadius(4)
.padding(theme.statusDisplayStyle == .compact ? 0 : 10) .padding(theme.statusDisplayStyle == .compact ? 0 : 10)
.alert( .alert(
@ -432,6 +438,9 @@ private struct FeaturedImagePreView: View {
RoundedRectangle(cornerRadius: 10) RoundedRectangle(cornerRadius: 10)
.stroke(.gray.opacity(0.35), lineWidth: 1) .stroke(.gray.opacity(0.35), lineWidth: 1)
) )
#if os(visionOS)
.hoverEffect()
#endif
} }
} }
.overlay { .overlay {