mirror of
https://github.com/ultimatepp/ultimatepp.git
synced 2026-05-15 14:16:07 -06:00
CtrlCore: Theme change detection in gtk
This commit is contained in:
parent
fdc39acfcd
commit
709940e221
1 changed files with 10 additions and 0 deletions
|
|
@ -61,6 +61,11 @@ bool RunningOnWayland()
|
|||
return running_on_wayland;
|
||||
}
|
||||
|
||||
void sTheme(void *)
|
||||
{
|
||||
DDUMP(GetSysTime());
|
||||
}
|
||||
|
||||
void InitGtkApp(int argc, char **argv, const char **envptr)
|
||||
{
|
||||
LLOG(rmsecs() << " InitGtkApp");
|
||||
|
|
@ -91,6 +96,11 @@ void InitGtkApp(int argc, char **argv, const char **envptr)
|
|||
#if CATCH_ERRORS
|
||||
g_log_set_default_handler (CatchError, 0);
|
||||
#endif
|
||||
GtkSettings *settings = gtk_settings_get_default ();
|
||||
if(settings) {
|
||||
g_signal_connect_swapped(settings, "notify::gtk-theme-name", G_CALLBACK(sTheme), NULL);
|
||||
g_signal_connect_swapped(settings, "notify::gtk-application-prefer-dark-theme", G_CALLBACK(sTheme), NULL);
|
||||
}
|
||||
}
|
||||
|
||||
void ExitGtkApp()
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue