MarcinOrlowski / html-clock-plasmoid

Configurable and lightweight clock widget for KDE. Stylable with QT supported subset of HTML markup, supporting variety of usable placeholders to design clock widget as you like.
68 stars 5 forks source link

Incorrect handling of multiple {flip} blocks per single template line #57

Closed zohozer closed 1 year ago

zohozer commented 1 year ago

I do try to make the minutes to blink on every second pass but seems that the {flip} option it is not working properly.

If I do

<span style="color: {flip:red:green};">{flip:{ii}:{ii}}</span>

I get {fli displayed on screen instead of the minutes numbers.

How to fix this flipping issue?

MarcinOrlowski commented 1 year ago

Thanks for the feedback. There are indeed some oddities in how flip works. As far as I can tell the problem shows up when you got more than one {flip} in a single text line. That most likely a bug, but it seems the workaround is trivial here - just break your markup into multiple lines so only single flip per line remains. In case of your template making it look like this should work that bug around:

<span style="color: {flip:red:green};">
{flip:{ii}:{ii}}</span>
MarcinOrlowski commented 1 year ago

BTW: {flip:{ii}:{ii}} is simply just {ii} as alternating between the same value makes no much of a benefit, so you can also remove that {flip} completely and keep just {ii} there.

<span style="color: {flip:red:green};">
{ii}</span>
MarcinOrlowski commented 1 year ago

Debug note: it seems it's not about the flip but the how {} are handled as you can have single {flip} and then some other placeholders in the same line and that bug can show up as well, i.e. {flip:FOO:BAR} {DDD:U}. Workaround still the same.

MarcinOrlowski commented 1 year ago

Fixed in 1.6.4

zohozer commented 1 year ago

Thank you for the fix. I am currently running the 1.6.3 version and seems that it is not upgrading by itself. If I right-click on the clock and press the "Check for update..." button, nothing happens.

I am running SteamOS (Arch distro) on a SteamDeck machine. The discover package manager is up to date with all the software but this plasmoid clock don't seems to update.

MarcinOrlowski commented 1 year ago

It would not self update that way anyway but just notify about newer version. Will check why that is not working