Martchus / syncthingtray

Tray application and Dolphin/Plasma integration for Syncthing
https://martchus.github.io/syncthingtray/
Other
1.54k stars 43 forks source link

Version 1.4.1 and 1.4.2 Don't Respect QT Palette Settings #186

Closed Ryonez closed 11 months ago

Ryonez commented 1 year ago

Relevant components

Environment and versions

Bug description The QT Palette selected is not respected. The colours are incorrect, and when the setting dialog is closed it is reverted to default.

Steps to reproduce Set QT setting to: image With the following Palette: dark-palette.zip

Expected behaviour For the palette to be correctly used.

Screenshots Synctray Version 1.3.2 to 1.4.0 image image

Synctray Version 1.4.1 and up image image Applying the dark-palette image And after clicking Ok image

Martchus commented 1 year ago

I'm pretty sure I tested this at some point but you're right, this is not really working now. The palette can be changed but when changing the style it is reset accidentally.

Ryonez commented 1 year ago

Would like to note it's not just the saving that's a problem, the palette file imported isn't read correctly either. The colours don't match previous version.

Martchus commented 1 year ago

I think the loading part is fine. Likely you tried to load the dark palette mentioned in the initial issue comment and it was then overridden with the dark "defaults" from the Qt framework - because that is the one problem I could reproduce and have already fixed.

Martchus commented 1 year ago

I've noticed that some color roles could indeed not be loaded correctly, or rather not be immediately applied correctly.

I've just made a new release that is supposed to fix problems with the palette settings (and a few other regressions). Perhaps there are still some subtile bugs in the palette editor or in the way palettes are applied but as an immediate fix this is hopefully good enough.

Ryonez commented 1 year ago

The 1.4.3 release seams to make things start to work again. It does still lose settings from <=1.40, but I am able to load the palette and it seems to remain persistent.

Thank you very much for getting that sorted. I know it didn't impact functionality elsewhere, but that would've bugged me to keep around.

I'll leave you to close the issue if you'd like, I'm happy where it's at. Not sure if the settings getting lost in the first place is worth pursuing or not. I'm guessing maybe a qt config dir changed somewhere.

Martchus commented 1 year ago

It does still lose settings from <=1.40

I assume you mean "<= 1.4.0". So you have preserved a config file that was last saved using 1.4.0 or lower and tried to load that with 1.4.1 or newer? I would expect that this works as of 1.4.3. If this doesn't work then presumably Qt changed how QPalette objects are serialized. Of course this won't work anyways if the config file was messed with by 1.4.1 or 1.4.2; then 1.4.3 won't be able to restore what has been lost.

If you have any problems just with 1.4.3 feel free to share the details (e.g. some color role is not stored persistently). I've already noticed that the link color isn't used in all places where I'd expected it to be used but that's likely a problem of Qt itself and not worth persuing.