Detect dark mode
Posted: Tue Mar 18, 2025 10:05 pm
I've been using this code:
But recently it's been giving this warning:
Code: Select all
Procedure.i isDarkModeLinux()
Protected boolVal.i, *Settings
*Settings = gtk_settings_get_default_()
If *Settings
g_object_get_(*Settings, "gtk-application-prefer-dark-theme", @boolVal);
ProcedureReturn boolVal
EndIf
EndProcedure
Anyone know what is happening?[WARNING] GLib-GObject (CRITICAL): g_object_get_is_valid_property: object class 'GtkSettings' has no property named 'W'