tilorenz / TimeProgressBar

A progress bar showing the progress of time on your KDE Plasma desktop.
Other
2 stars 1 forks source link

Display days remaining instead of percentage remaining #3

Open ryerrappa opened 1 month ago

ryerrappa commented 1 month ago

Would it be possible to do this? Not familiar with QML but if you could point me in the right direction I can attempt to make the change.

tilorenz commented 1 month ago

It's certainly possible. If you want to do it yourself, I'd recommend you look at the get___Progress functions in package/contents/ui/main.qml and make them return not just the fraction of the time that has passed, but also the raw time (js represents this in ms) that has passed and the total duration of the interval. You can then add the respective properties in the root item and the TimeProgressBar.qml-root item and use them in fillTemplateText. I'd suggest using d and D as placeholders for passed and remaining days, h and H for hours etc. If you get stuck feel free to ask for help :)

tilorenz commented 1 month ago

Also, https://develop.kde.org/docs/plasma/widget/