Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

nomacs could not change theme through Setting Tab #1062

Open
LloydLore opened this issue Apr 12, 2024 · 12 comments
Open

nomacs could not change theme through Setting Tab #1062

LloydLore opened this issue Apr 12, 2024 · 12 comments
Labels

Comments

@LloydLore
Copy link

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:

  1. Edit --> Settings, (Ctrl+Shift+P, could enter setting tab as well)
  2. In settings tab, select General tab, and choose the option "Color Settings" from "Dark Theme" to "Light Theme"
  3. The bottom line of this tab will prompt "Please Restart nomacs to apply changes"
  4. Click the prompt, the application restarts, and the theme doesn't change
  5. 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!

@Aqa-Ib
Copy link

Aqa-Ib commented Apr 13, 2024

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!

@leejuyuu
Copy link
Collaborator

Reproduced with nomacs 3.17.2295 (94e9ada) on Arch Linux.

@leejuyuu leejuyuu added the bug label Apr 26, 2024
@leejuyuu leejuyuu changed the title nomacs couldn't could not change theme through Setting Tab nomacs could not change theme through Setting Tab Apr 26, 2024
@leejuyuu
Copy link
Collaborator

It seems that this bug is intermittent. Some times the theme and config file is written correctly.

@leejuyuu
Copy link
Collaborator

@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.

@LloydLore
Copy link
Author

@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.

@Aqa-Ib
Copy link

Aqa-Ib commented Apr 29, 2024

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)

@leejuyuu
Copy link
Collaborator

leejuyuu commented Apr 30, 2024

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.

@Aqa-Ib
Copy link

Aqa-Ib commented Apr 30, 2024

My build is from commit e9a25e5

@artofit
Copy link

artofit commented May 21, 2024

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

@LloydLore
Copy link
Author

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

@artofit
Copy link

artofit commented May 29, 2024

The theme field lies under section [DisplaySettings] and the field is themeName312
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?

@LloydLore
Copy link
Author

@artofit , on my machine, nomacs is build on top of Qt 6.6.3,
see below:
image
and I manually set the theme as such:
image
I shall say it works on my machine, and I don't tried this method with Qt 6.7.x.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

4 participants