You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I have enabled dark mode on Xournal++ on Windows 11, however the titlebar is a white color, which can be pretty annoying.
This answer provides an insight on how this is possible. I got as far as getting the win32 handle from GDK (reference) and calling DwmSetWindowAttribute on it.
#include<gdk/gdkwin32.h>
#include<dwmapi.h>
GdkWindow* gdk_window = gtk_widget_get_window(GTK_WIDGET(GTK_WINDOW(getWindow())));
HWND wnd = static_cast<HWND>(GDK_WINDOW_HWND(gdk_window)); // returns an HGDIOBJ by default// use immersive dark mode
BOOL USE_DARK_MODE = true;
BOOL SET_IMMERSIVE_DARK_MODE_SUCCESS = SUCCEEDED(DwmSetWindowAttribute(
wnd, DWMWINDOWATTRIBUTE::DWMWA_USE_IMMERSIVE_DARK_MODE,
&USE_DARK_MODE, sizeof(USE_DARK_MODE)));
However when running this I got a segmentation fault, and couldn't get any further. Tried this with changing the caption color too, but got the same error. Hope that this gets fixed. I'm loving the experience with the app so far.
Expected Behaviour
The titlebar should have a dark color or a themed color like the windows explorer titlebar.
Steps to Reproduce
Launch Xournal++ in Dark Mode
Additional Context
Windows 11 (Dark Mode)
The text was updated successfully, but these errors were encountered:
I tried reproducing this with a standalone GTK window, and I am getting the same error. Perhaps its some bug with GTK, or someone who knows how to use the win32 handle can help out
Operating System
Windows
(Linux only) Distribution
No response
(Linux only) Desktop Environment
No response
(Linux Only) Display Server
None
Installation Method
Release Binaries
Xournal++ Version
1.2.2+dev
libgtk Version
3.24.39
Bug Description
I have enabled dark mode on Xournal++ on Windows 11, however the titlebar is a white color, which can be pretty annoying.
This answer provides an insight on how this is possible. I got as far as getting the win32 handle from GDK (reference) and calling
DwmSetWindowAttribute
on it.However when running this I got a segmentation fault, and couldn't get any further. Tried this with changing the caption color too, but got the same error. Hope that this gets fixed. I'm loving the experience with the app so far.
Expected Behaviour
The titlebar should have a dark color or a themed color like the windows explorer titlebar.
Steps to Reproduce
Launch Xournal++ in Dark Mode
Additional Context
Windows 11 (Dark Mode)
The text was updated successfully, but these errors were encountered: