mirror of
https://github.com/danbulant/dots-hyprland
synced 2026-05-24 12:22:09 +00:00
stopwatch: clear laps on Start
This commit is contained in:
parent
709415a6b4
commit
86f1e63ed2
2 changed files with 2 additions and 1 deletions
|
|
@ -191,7 +191,7 @@ Item {
|
|||
else
|
||||
TimerService.stopwatchReset()
|
||||
}
|
||||
enabled: TimerService.stopwatchTime !== 0
|
||||
enabled: TimerService.stopwatchTime > 0 || Persistent.states.timer.stopwatch.laps.length > 0
|
||||
|
||||
colBackground: TimerService.stopwatchRunning ? Appearance.colors.colLayer2 : Appearance.colors.colErrorContainer
|
||||
colBackgroundHover: TimerService.stopwatchRunning ? Appearance.colors.colLayer2Hover : Appearance.colors.colErrorContainerHover
|
||||
|
|
|
|||
|
|
@ -125,6 +125,7 @@ Singleton {
|
|||
}
|
||||
|
||||
function stopwatchResume() {
|
||||
if (stopwatchTime === 0) Persistent.states.timer.stopwatch.laps = [];
|
||||
Persistent.states.timer.stopwatch.running = true;
|
||||
Persistent.states.timer.stopwatch.start = getCurrentTimeIn10ms() - stopwatchTime;
|
||||
}
|
||||
|
|
|
|||
Loading…
Reference in a new issue