mirror of
https://github.com/pepaskopec-blip/Graduately.git
synced 2026-10-27 15:14:35 +00:00
Replace mirrored Liquid Glass panels with soft opaque card surfaces.
Co-authored-by: Cursor <cursoragent@cursor.com>
This commit is contained in:
parent
59c2479f7d
commit
3612d60f42
3 changed files with 29 additions and 9 deletions
|
|
@ -49,10 +49,11 @@ struct PrimaryButton: View {
|
|||
.font(.body.weight(.semibold))
|
||||
.frame(maxWidth: .infinity)
|
||||
}
|
||||
.buttonStyle(.glassProminent)
|
||||
#if os(macOS)
|
||||
.buttonStyle(.borderedProminent)
|
||||
.controlSize(.extraLarge)
|
||||
#else
|
||||
.buttonStyle(.glassProminent)
|
||||
.controlSize(.large)
|
||||
#endif
|
||||
}
|
||||
|
|
@ -75,7 +76,22 @@ struct GlassCard<Content: View>: View {
|
|||
content()
|
||||
.padding(16)
|
||||
.frame(maxWidth: .infinity, alignment: .leading)
|
||||
.glassEffect(.regular, in: .rect(cornerRadius: 26, style: .continuous))
|
||||
.softSurface(cornerRadius: 22)
|
||||
}
|
||||
}
|
||||
|
||||
extension View {
|
||||
/// Soft card surface without Liquid Glass refraction (which reads as a mirror
|
||||
/// on large macOS panels over the wallpaper / sidebar extension).
|
||||
func softSurface(cornerRadius: CGFloat) -> some View {
|
||||
background {
|
||||
RoundedRectangle(cornerRadius: cornerRadius, style: .continuous)
|
||||
.fill(.background.secondary)
|
||||
}
|
||||
.overlay {
|
||||
RoundedRectangle(cornerRadius: cornerRadius, style: .continuous)
|
||||
.strokeBorder(.separator.opacity(0.35), lineWidth: 0.5)
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -48,7 +48,6 @@ struct PracticeHome: View {
|
|||
.frame(maxWidth: 920, alignment: .leading)
|
||||
.frame(maxWidth: .infinity, alignment: .leading)
|
||||
}
|
||||
.backgroundExtensionEffect()
|
||||
.navigationTitle("Maturita")
|
||||
}
|
||||
|
||||
|
|
@ -92,7 +91,7 @@ struct PracticeHome: View {
|
|||
}
|
||||
.padding(18)
|
||||
.frame(maxWidth: .infinity, minHeight: 148, alignment: .topLeading)
|
||||
.glassEffect(.regular, in: .rect(cornerRadius: 24, style: .continuous))
|
||||
.softSurface(cornerRadius: 20)
|
||||
}
|
||||
#endif
|
||||
|
||||
|
|
@ -192,7 +191,11 @@ struct ChangelogCard: View {
|
|||
ChangelogLines(index: index, lines: changelogLines(block, langKey))
|
||||
}
|
||||
Button(vm.tr("changelog_dismiss")) { vm.dismissChangelog() }
|
||||
#if os(macOS)
|
||||
.buttonStyle(.borderedProminent)
|
||||
#else
|
||||
.buttonStyle(.glassProminent)
|
||||
#endif
|
||||
.controlSize(.small)
|
||||
}
|
||||
}
|
||||
|
|
@ -547,7 +550,6 @@ struct RoadmapScreen: View {
|
|||
wave: 16
|
||||
)
|
||||
.padding(20)
|
||||
.backgroundExtensionEffect()
|
||||
.navigationTitle(vm.tr("roadmap_title"))
|
||||
.navigationSubtitle(vm.tr("roadmap_sub"))
|
||||
}
|
||||
|
|
@ -635,7 +637,6 @@ struct UnitMapScreen: View {
|
|||
branch: branch
|
||||
)
|
||||
.padding(20)
|
||||
.backgroundExtensionEffect()
|
||||
.navigationTitle(u.str("title"))
|
||||
.navigationSubtitle(vm.tr(u.str("sub")))
|
||||
}
|
||||
|
|
@ -741,7 +742,6 @@ struct LessonListScreen: View {
|
|||
wave: 14
|
||||
)
|
||||
.padding(20)
|
||||
.backgroundExtensionEffect()
|
||||
.navigationTitle(title)
|
||||
.navigationSubtitle(subtitle)
|
||||
}
|
||||
|
|
@ -807,7 +807,11 @@ struct SlidesScreen: View {
|
|||
Image(systemName: "chevron.left")
|
||||
.frame(minWidth: 24)
|
||||
}
|
||||
#if os(macOS)
|
||||
.buttonStyle(.bordered)
|
||||
#else
|
||||
.buttonStyle(.glass)
|
||||
#endif
|
||||
.controlSize(.large)
|
||||
}
|
||||
if idx < slides.count - 1 {
|
||||
|
|
|
|||
|
|
@ -142,13 +142,13 @@ private struct UpdateBanner: View {
|
|||
Spacer()
|
||||
if vm.update.canInstall {
|
||||
Button(vm.tr("update_install")) { vm.installUpdate() }
|
||||
.buttonStyle(.glassProminent)
|
||||
.buttonStyle(.borderedProminent)
|
||||
.controlSize(.small)
|
||||
}
|
||||
}
|
||||
.padding(.horizontal, 16)
|
||||
.padding(.vertical, 12)
|
||||
.glassEffect(.regular, in: .rect(cornerRadius: 18, style: .continuous))
|
||||
.softSurface(cornerRadius: 16)
|
||||
.frame(maxWidth: 560)
|
||||
}
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue