Update floating window controls

This commit is contained in:
Hariharan Mudaliar 2025-12-11 23:29:02 +05:30
commit 28ab90a402
No known key found for this signature in database
GPG key ID: D04F1C2B9194DDFC
4 changed files with 132 additions and 61 deletions

View file

@ -152,14 +152,16 @@ private struct ActiveTimerSection: View {
}
HStack(spacing: 8) {
Button(action: togglePause) {
Label(timerManager.isPaused ? "Resume" : "Pause", systemImage: timerManager.isPaused ? "play.fill" : "pause.fill")
.font(.system(size: 12, weight: .medium))
.labelStyle(.titleAndIcon)
if !timerManager.isOvertime {
Button(action: togglePause) {
Label(timerManager.isPaused ? "Resume" : "Pause", systemImage: timerManager.isPaused ? "play.fill" : "pause.fill")
.font(.system(size: 12, weight: .medium))
.labelStyle(.titleAndIcon)
}
.buttonStyle(.bordered)
.disabled(!timerManager.allowsManualInteraction)
}
.buttonStyle(.bordered)
.disabled(!timerManager.allowsManualInteraction)
Button(role: .destructive, action: stopTimer) {
Label("Stop", systemImage: "stop.fill")
.font(.system(size: 12, weight: .medium))