Black window title bar when dark theme is active

Ideas for improvements and requests for new features in XnView MP

Moderators: XnTriq, helmut, xnview

User avatar
Lord_D
Posts: 1
Joined: Fri Jan 12, 2024 4:32 am

Black window title bar when dark theme is active

Post by Lord_D »

Window title bar is white when dark theme is active:
XnView_MP_white_titlebar.png
It is posible to make it black
XnView_MP_black_titlebar.png
by adding to qt.conf those lines:

Code: Select all

[Platforms]
WindowsArguments = darkmode=1
or launching XnView with platform argument:

Code: Select all

"C:\Program Files\XnViewMP\xnviewmp.exe" -platform windows:darkmode=1
To achieve this behavior programmatically, Qt Blog suggests to set the environment variable in the main function via

Code: Select all

qsetenv("QT_QPA_PLATFORM", "windows:darkmode=1")
You do not have the required permissions to view the files attached to this post.
DarkDarkEverything
Posts: 2
Joined: Wed Jul 19, 2023 6:53 am

Re: Black window title bar when dark theme is active

Post by DarkDarkEverything »

Lord_D wrote: Fri Jan 12, 2024 5:29 am by adding to qt.conf those lines:

Code: Select all

[Platforms]
WindowsArguments = darkmode=1
That worked, thank you very much, would be great if that could be the default.

Oh, no. I just upgraded to the latest version (downloaded the Windows Setup) and the setting was rightout overwritten.
So changing the qt.conf file isn't really an option.

And command line parameters aren't an option either when using XNViewMP as the default image viewer.
So basically the program can do it but doesn't use its own functionality :(
KLE-France
Posts: 57
Joined: Mon Jan 14, 2019 3:00 pm

Re: Black window title bar when dark theme is active

Post by KLE-France »

+1
KLE-France
Posts: 57
Joined: Mon Jan 14, 2019 3:00 pm

Re: Black window title bar when dark theme is active

Post by KLE-France »

Beyond the "+1", this excellent suggestion should also extend to the "Black" and "Old dark" themes as well. Bref, the Window's title bar should be harmonized with the color scheme.
User avatar
xnview
Author of XnView
Posts: 44922
Joined: Mon Oct 13, 2003 7:31 am
Location: France

Re: Black window title bar when dark theme is active

Post by xnview »

currently the only way is to change qt.conf
Pierre.