Skip to content

Commit

Permalink
✨ Improve text contrast in light mode
Browse files Browse the repository at this point in the history
  • Loading branch information
MrKai77 committed Jun 16, 2024
1 parent a9d6b0c commit bde572e
Showing 1 changed file with 47 additions and 14 deletions.
61 changes: 47 additions & 14 deletions Loop/Updater/UpdateView.swift
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,7 @@ import SwiftUI

struct UpdateView: View {
@Environment(\.tintColor) var tintColor
@Environment(\.colorScheme) var colorScheme

@ObservedObject var updater = AppDelegate.updater
@State var isInstalling: Bool = false
Expand Down Expand Up @@ -99,30 +100,62 @@ struct UpdateView: View {

func theLoopTimesView() -> some View {
ZStack {
TheLoopTimes()
.fill(
.shadow(.inner(color: .black.opacity(0.1), radius: 3))
.shadow(.inner(color: .black.opacity(0.3), radius: 5, y: 3))
)
.foregroundStyle(.white.opacity(0.7))
.blendMode(.overlay)
if colorScheme == .dark {
TheLoopTimes()
.fill(
.shadow(.inner(color: .black.opacity(0.1), radius: 3))
.shadow(.inner(color: .black.opacity(0.3), radius: 5, y: 3))
)
.foregroundStyle(.primary.opacity(0.7))
.blendMode(.overlay)
} else {
TheLoopTimes()
.foregroundStyle(.primary.opacity(0.7))
.blendMode(.overlay)

TheLoopTimes()
.fill(
.shadow(.inner(color: .black.opacity(0.1), radius: 3))
.shadow(.inner(color: .black.opacity(0.3), radius: 5, y: 3))
)
.blendMode(.overlay)
}

TheLoopTimes()
.stroke(.white.opacity(0.1), lineWidth: 1)
.stroke(.primary.opacity(0.1), lineWidth: 1)
.blendMode(.luminosity)
}
.aspectRatio(883.88 / 135.53, contentMode: .fit)
.frame(width: 450)
}

func versionChangeView() -> some View {
HStack {
Text(Bundle.main.appVersion ?? "Unknown")
Image(systemName: "arrow.right")
Text(updater.availableReleases.first?.tagName ?? "Unknown")
ZStack {
if colorScheme == .dark {
HStack {
Text(Bundle.main.appVersion ?? "Unknown")
Image(systemName: "arrow.right")
Text(updater.availableReleases.first?.tagName ?? "Unknown")
}
.foregroundStyle(.primary.opacity(0.7))
.blendMode(.overlay)
} else {
HStack {
Text(Bundle.main.appVersion ?? "Unknown")
Image(systemName: "arrow.right")
Text(updater.availableReleases.first?.tagName ?? "Unknown")
}
.foregroundStyle(.primary.opacity(0.7))
.blendMode(.overlay)

HStack {
Text(Bundle.main.appVersion ?? "Unknown")
Image(systemName: "arrow.right")
Text(updater.availableReleases.first?.tagName ?? "Unknown")
}
.blendMode(.overlay)
}
}
.font(.title3)
.blendMode(.overlay)
}

func changelogView() -> some View {
Expand Down

0 comments on commit bde572e

Please sign in to comment.