forked from Shinonome/dots-hyprland
stopwatch: clear laps on Start
This commit is contained in:
@@ -191,7 +191,7 @@ Item {
|
|||||||
else
|
else
|
||||||
TimerService.stopwatchReset()
|
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
|
colBackground: TimerService.stopwatchRunning ? Appearance.colors.colLayer2 : Appearance.colors.colErrorContainer
|
||||||
colBackgroundHover: TimerService.stopwatchRunning ? Appearance.colors.colLayer2Hover : Appearance.colors.colErrorContainerHover
|
colBackgroundHover: TimerService.stopwatchRunning ? Appearance.colors.colLayer2Hover : Appearance.colors.colErrorContainerHover
|
||||||
|
|||||||
@@ -125,6 +125,7 @@ Singleton {
|
|||||||
}
|
}
|
||||||
|
|
||||||
function stopwatchResume() {
|
function stopwatchResume() {
|
||||||
|
if (stopwatchTime === 0) Persistent.states.timer.stopwatch.laps = [];
|
||||||
Persistent.states.timer.stopwatch.running = true;
|
Persistent.states.timer.stopwatch.running = true;
|
||||||
Persistent.states.timer.stopwatch.start = getCurrentTimeIn10ms() - stopwatchTime;
|
Persistent.states.timer.stopwatch.start = getCurrentTimeIn10ms() - stopwatchTime;
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user