nomacs
nomacs copied to clipboard
nomacs could not change theme through Setting Tab
I am a new user for nomacs v3.172295. The default theme is "Dark-theme", and I'd like to use "Light-theme". Issue Description: Could not change theme through menu/settings tab, Reproduce Step:
- Edit --> Settings, (Ctrl+Shift+P, could enter setting tab as well)
- In settings tab, select General tab, and choose the option "Color Settings" from "Dark Theme" to "Light Theme"
- The bottom line of this tab will prompt "Please Restart nomacs to apply changes"
- Click the prompt, the application restarts, and the theme doesn't change
- Also, the option "Color Setting"'s value doesn't change.
Walkaround: I could manually change the settings resides in path "$HOME/.config/nomacs/'Image Louge.conf', the config field is "themeName312", change this value will result in application theme change.
BTW, this application is awesome, thank you!
Can reproduce in Arch Linux, installed through the AUR package.
I could manually change the settings resides in path "$HOME/.config/nomacs/'Image Louge.conf', the config field is "themeName312", change this value will result in application theme change.
For anyone wondering, that variable belongs in the [DisplaySettings] section and it values can be Dark-Theme.css, Light-Theme.css or System.css
Thanks!
Reproduced with nomacs 3.17.2295 (94e9ada) on Arch Linux.
It seems that this bug is intermittent. Some times the theme and config file is written correctly.
@LloydLore @Aqa-Ib I had a harder time reproducing this on 3.17.2296 (515812d) when trying to fix this. Could you try newer version as well?
A possible cause is that QSettings
does not write to the file before the program closes. Maybe we can call sync()
manually to try to make file writes earlier.
@leejuyuu , I am using Arco Linux while it seems the package manager didn't update to the newest version. I will try it once the package is updated.
I have tried with latest git (installed through AUR package nomacs-git) and still the same here. Probably these warnings are relevant:
[WARNING] QMetaObject::connectSlotsByName: No matching signal for on_themeBox_currentIndexChanged(QString)
[WARNING] QMetaObject::connectSlotsByName: No matching signal for on_keepZoom_buttonClicked(int)
[WARNING] QMetaObject::connectSlotsByName: No matching signal for on_loadGroup_buttonClicked(int)
[WARNING] QMetaObject::connectSlotsByName: No matching signal for on_saveGroup_buttonClicked(int)
[WARNING] QMetaObject::connectSlotsByName: No matching signal for on_openDefault_clicked()
[WARNING] QMetaObject::connectSlotsByName: No matching signal for on_associateFiles_clicked()
[WARNING] QMetaObject::connectSlotsByName: No matching signal for on_loadRaw_buttonClicked(int)
I have tried with latest git (installed through AUR package nomacs-git) and still the same here.
@Aqa-Ib Thanks for providing the warning messages. Please help provide the version of nomacs you can find in “? > About”. It would be hard to identify "the latest git version" for future issue readers because the project is still being developed.
My build is from commit e9a25e560e218713d1fdf1876aee20b858adb0a7
I have the same issue( does not save settings) with a fresh install of Manjaro XFCE 24.0 Nomacs 3.17.2295(Qt 6.7.0 ; 94e9adaa 2024-02-29)
The build Nomacs 3.17.2295 with Qt 5.15.13 (6dfc7790, 2024-05-20) solves the issues !! So probably a Qt6 bug
REM: under "/.config/nomacs/'Image Louge.conf" I do not see/have a theme field as said in first post
I have the same issue( does not save settings) with a fresh install of Manjaro XFCE 24.0 Nomacs 3.17.2295(Qt 6.7.0 ; 94e9ada 2024-02-29)
The build Nomacs 3.17.2295 with Qt 5.15.13 (6dfc779, 2024-05-20) solves the issues !! So probably a Qt6 bug
REM: under "/.config/nomacs/'Image Louge.conf" I do not see/have a theme field as said in first post
The theme field lies under section [DisplaySettings]
and the field is themeName312
The theme field lies under section
[DisplaySettings]
and the field isthemeName312
With Qt 5.15.13 I have indeed under "/.config/nomacs/'Image Louge.conf" : themeName312=Dark-Theme.css @LloydLore do you mean if I revert back to Qt 6.7.x and manually modify themeName312 as such it'll be ok?
@artofit , on my machine, nomacs is build on top of Qt 6.6.3,
see below:
and I manually set the theme as such:
I shall say it works on my machine, and I don't tried this method with Qt 6.7.x.
Thanks for the input! Confirmed it's related to the Qt version and the missing signals.
@novomesk I think these missing signals appears because some things got renamed at some point. I suggest removing the autoconnecting QMetaObject::connectSlotsByName
and replace with manually writing QObject::connect
, so we can (probably) catch some of the renaming problems at compile time. Do you think this is a valid approach?
Do you think this is a valid approach?
Honestly, I don't know. I am not familiar with this part of code.
Thanks for the response! I'll try what I can do then.
@LloydLore, @Aqa-Ib, @artofit If you are available, please help test whether #1096 fixes this issue (and if it breaks other things). Thanks!