general: improve consistency
This commit is contained in:
@@ -99,7 +99,7 @@ class TimerEngine: ObservableObject {
|
||||
}
|
||||
}
|
||||
|
||||
private func triggerReminder(for type: TimerType) {
|
||||
func triggerReminder(for type: TimerType) {
|
||||
switch type {
|
||||
case .lookAway:
|
||||
pause()
|
||||
|
||||
@@ -16,7 +16,7 @@ struct AnimatedFaceView: View {
|
||||
ZStack {
|
||||
// Face circle
|
||||
Circle()
|
||||
.fill(Color.yellow)
|
||||
.stroke(Color.accentColor, lineWidth: size * 0.04)
|
||||
.frame(width: size, height: size)
|
||||
|
||||
// Eyes
|
||||
@@ -28,7 +28,7 @@ struct AnimatedFaceView: View {
|
||||
|
||||
// Smile
|
||||
Arc(startAngle: .degrees(20), endAngle: .degrees(160), clockwise: false)
|
||||
.stroke(Color.black, lineWidth: size * 0.05)
|
||||
.stroke(Color.accentColor, lineWidth: size * 0.04)
|
||||
.frame(width: size * 0.5, height: size * 0.3)
|
||||
.offset(y: size * 0.15)
|
||||
}
|
||||
@@ -75,12 +75,12 @@ struct Eye: View {
|
||||
var body: some View {
|
||||
ZStack {
|
||||
Circle()
|
||||
.fill(Color.white)
|
||||
.stroke(Color.accentColor, lineWidth: size * 0.15)
|
||||
.frame(width: size, height: size)
|
||||
|
||||
Circle()
|
||||
.fill(Color.black)
|
||||
.frame(width: size * 0.5, height: size * 0.5)
|
||||
.fill(Color.accentColor)
|
||||
.frame(width: size * 0.3, height: size * 0.3)
|
||||
.offset(offset)
|
||||
}
|
||||
}
|
||||
|
||||
@@ -33,7 +33,7 @@ struct InfoBox: View {
|
||||
.foregroundColor(.white)
|
||||
}
|
||||
.padding()
|
||||
.glassEffect(.regular.tint(.blue), in: .rect(cornerRadius: 8))
|
||||
.glassEffect(.regular.tint(.accentColor), in: .rect(cornerRadius: 8))
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@@ -14,7 +14,7 @@ struct MenuBarButtonStyle: ButtonStyle {
|
||||
.background(
|
||||
RoundedRectangle(cornerRadius: 6)
|
||||
.fill(
|
||||
configuration.isPressed ? Color.blue.opacity(0.2) : Color.gray.opacity(0.1)
|
||||
configuration.isPressed ? Color.accentColor.opacity(0.2) : Color.gray.opacity(0.1)
|
||||
)
|
||||
.opacity(configuration.isPressed ? 1 : 0)
|
||||
)
|
||||
@@ -30,7 +30,7 @@ struct MenuBarHoverButtonStyle: ButtonStyle {
|
||||
configuration.label
|
||||
.background(
|
||||
RoundedRectangle(cornerRadius: 6)
|
||||
.fill(isHovered ? Color.blue.opacity(0.35) : Color.clear)
|
||||
.fill(isHovered ? Color.accentColor.opacity(0.35) : Color.clear)
|
||||
)
|
||||
.contentShape(Rectangle())
|
||||
.onHover { hovering in
|
||||
@@ -54,7 +54,7 @@ struct MenuBarContentView: View {
|
||||
HStack {
|
||||
Image(systemName: "eye.fill")
|
||||
.font(.title2)
|
||||
.foregroundColor(.blue)
|
||||
.foregroundColor(.accentColor)
|
||||
Text("Gaze")
|
||||
.font(.title2)
|
||||
.fontWeight(.semibold)
|
||||
@@ -79,6 +79,9 @@ struct MenuBarContentView: View {
|
||||
state: state,
|
||||
onSkip: {
|
||||
timerEngine.skipNext(type: timerType)
|
||||
},
|
||||
onDevTrigger: {
|
||||
timerEngine.triggerReminder(for: timerType)
|
||||
}
|
||||
)
|
||||
}
|
||||
@@ -153,7 +156,9 @@ struct TimerStatusRow: View {
|
||||
let type: TimerType
|
||||
let state: TimerState
|
||||
var onSkip: () -> Void
|
||||
var onDevTrigger: (() -> Void)? = nil
|
||||
@State private var isHoveredSkip = false
|
||||
@State private var isHoveredDevTrigger = false
|
||||
@State private var isHoveredBody = false
|
||||
|
||||
var body: some View {
|
||||
@@ -174,14 +179,34 @@ struct TimerStatusRow: View {
|
||||
|
||||
Spacer()
|
||||
|
||||
#if DEBUG
|
||||
if let onDevTrigger = onDevTrigger {
|
||||
Button(action: onDevTrigger) {
|
||||
Image(systemName: "bolt.fill")
|
||||
.font(.caption)
|
||||
.foregroundColor(.yellow)
|
||||
.padding(6)
|
||||
.background(
|
||||
Circle()
|
||||
.fill(isHoveredDevTrigger ? Color.yellow.opacity(0.35) : Color.clear)
|
||||
)
|
||||
}
|
||||
.buttonStyle(.plain)
|
||||
.help("Trigger \(type.displayName) reminder now (dev)")
|
||||
.onHover { hovering in
|
||||
isHoveredDevTrigger = hovering
|
||||
}
|
||||
}
|
||||
#endif
|
||||
|
||||
Button(action: onSkip) {
|
||||
Image(systemName: "forward.fill")
|
||||
.font(.caption)
|
||||
.foregroundColor(.blue)
|
||||
.foregroundColor(.accentColor)
|
||||
.padding(6)
|
||||
.background(
|
||||
Circle()
|
||||
.fill(isHoveredSkip ? Color.blue.opacity(0.35) : Color.clear)
|
||||
.fill(isHoveredSkip ? Color.accentColor.opacity(0.35) : Color.clear)
|
||||
)
|
||||
}
|
||||
.buttonStyle(.plain)
|
||||
@@ -194,7 +219,7 @@ struct TimerStatusRow: View {
|
||||
isHoveredBody = hovering
|
||||
}.background(
|
||||
RoundedRectangle(cornerRadius: 6).fill(
|
||||
isHoveredBody ? Color.blue.opacity(0.35) : Color.clear)
|
||||
isHoveredBody ? Color.accentColor.opacity(0.35) : Color.clear)
|
||||
)
|
||||
.padding(.horizontal)
|
||||
.padding(.vertical, 4)
|
||||
@@ -202,7 +227,7 @@ struct TimerStatusRow: View {
|
||||
|
||||
private var iconColor: Color {
|
||||
switch type {
|
||||
case .lookAway: return .blue
|
||||
case .lookAway: return .accentColor
|
||||
case .blink: return .green
|
||||
case .posture: return .orange
|
||||
}
|
||||
|
||||
@@ -47,7 +47,7 @@ struct BlinkSetupView: View {
|
||||
.foregroundColor(.white)
|
||||
}
|
||||
.padding()
|
||||
.glassEffect(.regular.tint(.blue), in: .rect(cornerRadius: 8))
|
||||
.glassEffect(.regular.tint(.accentColor), in: .rect(cornerRadius: 8))
|
||||
|
||||
VStack(alignment: .leading, spacing: 20) {
|
||||
Toggle("Enable Blink Reminders", isOn: $enabled)
|
||||
|
||||
@@ -32,7 +32,7 @@ struct CompletionView: View {
|
||||
|
||||
HStack(spacing: 16) {
|
||||
Image(systemName: "menubar.rectangle")
|
||||
.foregroundColor(.blue)
|
||||
.foregroundColor(.accentColor)
|
||||
.frame(width: 30)
|
||||
Text("Gaze will appear in your menu bar")
|
||||
.font(.subheadline)
|
||||
@@ -41,7 +41,7 @@ struct CompletionView: View {
|
||||
|
||||
HStack(spacing: 16) {
|
||||
Image(systemName: "clock")
|
||||
.foregroundColor(.blue)
|
||||
.foregroundColor(.accentColor)
|
||||
.frame(width: 30)
|
||||
Text("Timers will start automatically")
|
||||
.font(.subheadline)
|
||||
@@ -50,7 +50,7 @@ struct CompletionView: View {
|
||||
|
||||
HStack(spacing: 16) {
|
||||
Image(systemName: "gearshape")
|
||||
.foregroundColor(.blue)
|
||||
.foregroundColor(.accentColor)
|
||||
.frame(width: 30)
|
||||
Text("Adjust settings anytime from the menu bar")
|
||||
.font(.subheadline)
|
||||
|
||||
@@ -22,7 +22,7 @@ struct LookAwaySetupView: View {
|
||||
VStack(spacing: 30) {
|
||||
Image(systemName: "eye.fill")
|
||||
.font(.system(size: 60))
|
||||
.foregroundColor(.blue)
|
||||
.foregroundColor(.accentColor)
|
||||
|
||||
Text("Look Away Reminder")
|
||||
.font(.system(size: 28, weight: .bold))
|
||||
@@ -48,7 +48,7 @@ struct LookAwaySetupView: View {
|
||||
.foregroundColor(.white)
|
||||
}
|
||||
.padding()
|
||||
.glassEffect(.regular.tint(.blue), in: .rect(cornerRadius: 8))
|
||||
.glassEffect(.regular.tint(.accentColor), in: .rect(cornerRadius: 8))
|
||||
|
||||
VStack(alignment: .leading, spacing: 20) {
|
||||
Toggle("Enable Look Away Reminders", isOn: $enabled)
|
||||
|
||||
@@ -127,7 +127,7 @@ struct OnboardingContainerView: View {
|
||||
.foregroundColor(.white)
|
||||
}
|
||||
.glassEffect(
|
||||
.regular.tint(currentPage == 5 ? .green : .blue).interactive(),
|
||||
.regular.tint(currentPage == 5 ? .green : .accentColor).interactive(),
|
||||
in: .rect(cornerRadius: 10))
|
||||
}
|
||||
.padding(.horizontal, 40)
|
||||
|
||||
@@ -47,7 +47,7 @@ struct PostureSetupView: View {
|
||||
.foregroundColor(.white)
|
||||
}
|
||||
.padding()
|
||||
.glassEffect(.regular.tint(.blue), in: .rect(cornerRadius: 8))
|
||||
.glassEffect(.regular.tint(.accentColor), in: .rect(cornerRadius: 8))
|
||||
|
||||
VStack(alignment: .leading, spacing: 20) {
|
||||
Toggle("Enable Posture Reminders", isOn: $enabled)
|
||||
|
||||
@@ -16,7 +16,7 @@ struct SettingsOnboardingView: View {
|
||||
|
||||
Image(systemName: "gearshape.fill")
|
||||
.font(.system(size: 80))
|
||||
.foregroundColor(.blue)
|
||||
.foregroundColor(.accentColor)
|
||||
|
||||
Text("Final Settings")
|
||||
.font(.system(size: 36, weight: .bold))
|
||||
|
||||
@@ -14,7 +14,7 @@ struct WelcomeView: View {
|
||||
|
||||
Image(systemName: "eye.fill")
|
||||
.font(.system(size: 80))
|
||||
.foregroundColor(.blue)
|
||||
.foregroundColor(.accentColor)
|
||||
|
||||
Text("Welcome to Gaze")
|
||||
.font(.system(size: 36, weight: .bold))
|
||||
@@ -48,7 +48,7 @@ struct FeatureRow: View {
|
||||
HStack(alignment: .top, spacing: 16) {
|
||||
Image(systemName: icon)
|
||||
.font(.title2)
|
||||
.foregroundColor(.blue)
|
||||
.foregroundColor(.accentColor)
|
||||
.frame(width: 30)
|
||||
|
||||
VStack(alignment: .leading, spacing: 4) {
|
||||
|
||||
@@ -46,7 +46,7 @@ struct LookAwayReminderView: View {
|
||||
|
||||
Circle()
|
||||
.trim(from: 0, to: progress)
|
||||
.stroke(Color.blue, lineWidth: 8)
|
||||
.stroke(Color.accentColor, lineWidth: 8)
|
||||
.frame(width: 120, height: 120)
|
||||
.rotationEffect(.degrees(-90))
|
||||
.animation(.linear(duration: 1), value: progress)
|
||||
|
||||
Reference in New Issue
Block a user