heqro / colorschemeswapper-plasmoid

A KDE plasmoid to swap between any two given color schemes.
GNU General Public License v3.0
13 stars 2 forks source link

Configuration not being saved #2

Closed Tintow closed 1 year ago

Tintow commented 1 year ago

This widget sounds like exactly what I've been looking for but it doesn't work for me.

If I set the Color A and Color B themes it seems to save them until I actually switch using the button, it changes the theme once only and then it loses the themes I have set - the configuration panel drop downs are empty with nothing selected. The switch still toggles between states as though it's working but nothing actually happens.

If I add the widget and leave the default settings of BreezeClassic and BreezeDark then the switcher does work, however, in the config panel, the selected theme name become blank (So when I have BreezeClassic active, Color A is empty and Color B says BreezeDark. If I toggle again to Activate BreezeDark, Color A says BreezeClassic and Color B is empty. That's not a deal breaker, just a weird ui glitch.

The problem really is that I cannot select any themes other than the widgets default ones.

System details are:

Any ideas?

heqro commented 1 year ago

Thank you for your comment. This was a quick and dirty widget I did back in the day. I'll try to reproduce it once I have the time. I'm writing this comment to assure you that I have the intention to get around it... just maybe not today, nor this week... but eventually :)

Tintow commented 1 year ago

Thanks for the quick response. I'll keep an eye on the repo as and when you are able to update it. If you need any testing doing or need more info about the issue, please let me know.

Just for your reference, I found out about your widget in this recent YouTube video from The Linux Experiment (https://youtu.be/Sungl8gWU_8?si=SsNNZ6Y1CpmuQP61&t=655)

Maybe you'll be famous now 😃

heqro commented 1 year ago

The problem really is that I cannot select any themes other than the widgets default ones.

May you elaborate further on what you mean by this? In my particular case, all my colors seem to be listed

Tintow commented 1 year ago

Sorry, I may not have been clear.

All my themes/colors ARE listed when I use the drop down selection in the config page and I can select them and save them without issue. If I immediately go back into the config without doing anything else, I can see my selections were saved/remembered.

However, as soon as I click the widget to swap the colors, the colors are switched only the first time I click and then the entries in the config page become empty. If I click the drop down arrow, all the themes are there but nothing is actually selected.

I can reproduce like this; Have the BreezeClassic theme active

I do not have any non-standard themes or colours installed, I only use the default ones installed with Manjaro.

Hope that helps.

heqro commented 1 year ago

Do you happen to be using any language other than US for this widget? This is a quick and dirty widget and I didn't account for any locales, so this might be a reason why it's failing on your end

Tintow commented 1 year ago

Bingo!

I'm using English GB. If I switch over to English US and reboot, everything works as expected.

Would it be difficult to add locale support?

heqro commented 1 year ago

Hopefully, the issue is not so much about adding locale support, but more related to this line in particular https://github.com/heqro/colorschemeswapper-plasmoid/blob/2f71050d2243a2dae058b397dc0f4d51781e691e/contents/ui/config.qml#L46 I'll try to search for a way to trim the stuff inside parentheses (assuming all locales use parentheses!) and I'll get back to this issue. It looks very straightforward, but I have some stuff due for Monday and it's biting my butt! :)

heqro commented 1 year ago

I just pushed a change to this Github repo that should solve this issue. I tested under Portuguese and American English locales. I uploaded the change to the KDE Store. I don't know how people usually get notified that a new version of a widget is available, though.

Tintow commented 1 year ago

Wow! Colour me impressed! That fixed it and it's now working as expected.

Thank you so much for taking time on a weekend to sort this out and resolving it so quickly - it might seem like a small thing but this is really appreciated and will make my regular computer use a lot more pleasant 😃

heqro commented 1 year ago

Thank you for your kind words. Have a nice day! Closing this issue now!