Is there any way to change the colour of the title bar so that it fits with dark mode?
Windows 10 has the ability to use dark mode to change this feature globally and in the file explorer but it does not seem to apply to other programs.
Second image down shows what I mean, only difference is that I'm using View mode in windowed.
viewtopic.php?f=82&t=42012&p=170440#p170440
Dark Title Bar
Moderators: helmut, XnTriq, xnview
-
- Author of XnView
- Posts: 45870
- Joined: Mon Oct 13, 2003 7:31 am
- Location: France
-
- Moderator & Librarian
- Posts: 6501
- Joined: Sun Sep 25, 2005 3:00 am
- Location: Ref Desk
-
- Posts: 2
- Joined: Wed Jul 19, 2023 6:53 am
No unfocused dark title bar
The titlebar still turns white when the XNView MP window isn't in focus.
Screenshots taken with Win10, dark mode on, accent color grey, titlebar checkbox on.
XNView MP in focus YES:
https://imgur.com/a/nocEMqB
Result: Windows Explorer is dark, XNView MP is dark
XNView MP in focus NO:
https://imgur.com/a/UB4mj9G
Result: Windows Explorer is dark, XNView MP is light
How should it be?
The unfocused XNView MP title bar should be dark grey (which isn't - just to clarify - my choosen accent color in the screenshots), independent of the accent color and the proposed checkbox in windows color settings.
PS: leaving the checkbox off, makes (native) focused windows have plain black titlebars (instead of accent color).
That may be a personal taste thingy, but it's even more dark, soooo I think it's even better
Screenshots taken with Win10, dark mode on, accent color grey, titlebar checkbox on.
XNView MP in focus YES:
https://imgur.com/a/nocEMqB
Result: Windows Explorer is dark, XNView MP is dark
XNView MP in focus NO:
https://imgur.com/a/UB4mj9G
Result: Windows Explorer is dark, XNView MP is light
How should it be?
The unfocused XNView MP title bar should be dark grey (which isn't - just to clarify - my choosen accent color in the screenshots), independent of the accent color and the proposed checkbox in windows color settings.
PS: leaving the checkbox off, makes (native) focused windows have plain black titlebars (instead of accent color).
That may be a personal taste thingy, but it's even more dark, soooo I think it's even better

-
- Posts: 1
- Joined: Mon Sep 25, 2023 12:15 pm
Re: Dark Title Bar
Creating a dark title bar for win32 applications like XnView in Windows 10/11 during dark theme is quit simple to do (dark when the window is not active). Just use the function DwmSetWindowAttribute. In Delphi/Lazarus/Pascal it is like:
See code/examples:
https://forum.lazarus.freepascal.org/in ... ic=59351.0
https://stackoverflow.com/questions/571 ... windows-10
https://github.com/godotengine/godot-pr ... ssues/1868
Regards, Erik
Code: Select all
DWMWA_USE_IMMERSIVE_DARK_MODE_BEFORE_20H1 = 19;
DWMWA_USE_IMMERSIVE_DARK_MODE = 20;
TDwmSetWindowAttribute = function(hwnd: HWND; dwAttribute: DWORD; pvAttribute: Pointer; cbAttribute: DWORD): HRESULT; stdcall; // dwmapi.dll
if IsWindows10OrGreater(17763) then
begin
attr := DWMWA_USE_IMMERSIVE_DARK_MODE_BEFORE_20H1;
if IsWindows10OrGreater(18985) then attr := DWMWA_USE_IMMERSIVE_DARK_MODE;
DwmSetWindowAttribute(AForm.Handle, attr, @AValue, SizeOf(AValue));
end;
https://forum.lazarus.freepascal.org/in ... ic=59351.0
https://stackoverflow.com/questions/571 ... windows-10
https://github.com/godotengine/godot-pr ... ssues/1868
Regards, Erik
-
- Posts: 17
- Joined: Sun Dec 05, 2021 3:36 pm
Re: Dark Title Bar
Has anyone resolved the dark title bar "issue"?