This commit is contained in:
Mirek Fidler 2024-11-15 08:55:10 +01:00
commit 32154fb30c
3 changed files with 12 additions and 10 deletions

View file

@ -463,12 +463,12 @@ String Desc(const Ctrl *ctrl)
s << " \"" << q << '\"';
const Ctrl *top = ctrl->GetTopWindow();
if(top && top != ctrl) {
String q = top->GetDesc();
if(IsNull(q))
s << " (" << typeid(*top).name() << ")";
else
s << " (\"" << q << "\")";
}
String q = top->GetDesc();
if(IsNull(q))
s << " (" << typeid(*top).name() << ")";
else
s << " (\"" << q << "\")";
}
return s;
}

View file

@ -61,9 +61,9 @@ bool RunningOnWayland()
return running_on_wayland;
}
void sTheme(void *)
void Ctrl::ThemeChanged(void *)
{
DDUMP(GetSysTime());
PostReSkin();
}
void InitGtkApp(int argc, char **argv, const char **envptr)
@ -98,8 +98,8 @@ void InitGtkApp(int argc, char **argv, const char **envptr)
#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);
g_signal_connect_swapped(settings, "notify::gtk-theme-name", G_CALLBACK(Ctrl::ThemeChanged), NULL);
g_signal_connect_swapped(settings, "notify::gtk-application-prefer-dark-theme", G_CALLBACK(Ctrl::ThemeChanged), NULL);
}
}

View file

@ -10,6 +10,8 @@
static void AddEvent(gpointer user_data, int type, const Value& value, GdkEvent *event);
static void FetchEvents(bool may_block);
static void ThemeChanged(void *);
/*
_DBG_
static void AddEvent(gpointer user_data, int type, const Value& value);