Skip to content

gtk: Activate dark mode based on DBus

Colin Kinloch requested to merge ColinKinloch/libdecor:dark_mode into master

This checks if org.freedesktop.appearance.color-scheme is set to prefer dark on init and sets gtk-application-prefer-dark-theme accordingly.

I've also renamed cursor-settings.c to desktop-settings.c for code that accesses the freedesktop desktop settings portal.

I considered listening for changes at runtime but that seemed like a lot of extra effort for not much benefit. It could be easier by using GLib GDBusProxy but I can understand if that's too much of a dependency bump.

I also toyed with implementing accent-color but it's not in gnome yet and plasma implements server side decorations.

Merge request reports