Skip to content

applets/digital clock: hide timezones identical to the local timezone

It's possible and valid for the user to deliberately add a dedicated timezone entry for their local timezone, in addition to the pre-configured default "local timezone" entry. This can be useful when traveling, because then when you switch your current local timezone to one that matches your travel destintion, your typical local timezone still appears in the list of timezones without you having to add it again.

Currently, when you do this and you're not currently traveling, you end up with duplicate entries in the popup and tooltip that show the same city twice. To avoid this, now the plasmoid hides the duplicate entry from the popup and the tooltip, and shows the user a hint in the config dialog indicating that this will happen.

To make this work in the tooltip, I had to refactor the layout a bit to use a Kirigami.FormLayout and away from its prior implementation, which was rather hacky and breaks badly when conditionally adjusting the model contents.

@teams/usability

Before After
Clock_Before Clock_After
Edited by Nate Graham

Merge request reports