rename pomodoro service
This commit is contained in:
parent
4011f4b5c8
commit
a40f7666dc
2 changed files with 8 additions and 8 deletions
|
|
@ -55,10 +55,10 @@ StyledWindow {
|
|||
id: circle
|
||||
radius: 150
|
||||
borderColor: Theme.palette.base100
|
||||
strokeColor: Pomodoro.state == "timer" ? Theme.palette.primary : Theme.palette.warning
|
||||
strokeColor: PomodoroService.state == "timer" ? Theme.palette.primary : Theme.palette.warning
|
||||
strokeWidth: 12
|
||||
fillColor: button.hovered ? Theme.palette.primary : "transparent"
|
||||
percentage: (Pomodoro.state == "timer" ? (Pomodoro.initialTime - Pomodoro.remainingTime) : Pomodoro.remainingTime) / Pomodoro.initialTime % 1
|
||||
percentage: (PomodoroService.state == "timer" ? (PomodoroService.initialTime - PomodoroService.remainingTime) : PomodoroService.remainingTime) / PomodoroService.initialTime % 1
|
||||
}
|
||||
|
||||
StyledIconButton {
|
||||
|
|
@ -69,17 +69,17 @@ StyledWindow {
|
|||
radius: 9999
|
||||
|
||||
focus: root.visible
|
||||
text: Pomodoro.running ? Icons.square : Icons.play
|
||||
text: PomodoroService.running ? Icons.square : Icons.play
|
||||
font.pixelSize: 48
|
||||
|
||||
background: undefined
|
||||
onClicked: {
|
||||
Pomodoro.toggle();
|
||||
PomodoroService.toggle();
|
||||
}
|
||||
|
||||
Keys.onSpacePressed: event => {
|
||||
event.accepted = true;
|
||||
Pomodoro.toggle();
|
||||
PomodoroService.toggle();
|
||||
}
|
||||
Keys.onEscapePressed: event => {
|
||||
event.accepted = true;
|
||||
|
|
@ -87,7 +87,7 @@ StyledWindow {
|
|||
}
|
||||
Keys.onTabPressed: event => {
|
||||
event.accepted = true;
|
||||
Pomodoro.reset();
|
||||
PomodoroService.reset();
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
@ -95,7 +95,7 @@ StyledWindow {
|
|||
StyledText {
|
||||
Layout.alignment: Qt.AlignHCenter
|
||||
text: {
|
||||
const date = new Date(Pomodoro.remainingTime);
|
||||
const date = new Date(PomodoroService.remainingTime);
|
||||
return `${date.getMinutes().toString().padStart(2, "0")}:${(date.getSeconds() % 3600).toString().padStart(2, "0")}`;
|
||||
}
|
||||
font.pixelSize: 16
|
||||
|
|
@ -108,7 +108,7 @@ StyledWindow {
|
|||
text: "Reset"
|
||||
|
||||
onClicked: {
|
||||
Pomodoro.reset();
|
||||
PomodoroService.reset();
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue