mirror of
https://github.com/kotatogram/kotatogram-desktop
synced 2025-09-01 07:05:13 +00:00
Read decoration layout property from gtk
This commit is contained in:
@@ -181,6 +181,12 @@ void DarkModeChanged() {
|
||||
Core::App().settings().setSystemDarkMode(Platform::IsDarkMode());
|
||||
});
|
||||
}
|
||||
|
||||
void DecorationLayoutChanged() {
|
||||
Core::Sandbox::Instance().customEnterFromEventLoop([] {
|
||||
Core::App().settings().setWindowControlsLayout(Platform::WindowControlsLayout());
|
||||
});
|
||||
}
|
||||
#endif // !TDESKTOP_DISABLE_GTK_INTEGRATION
|
||||
|
||||
} // namespace
|
||||
@@ -289,6 +295,10 @@ void start() {
|
||||
if (!gtk_check_version(3, 0, 0)) {
|
||||
g_signal_connect(settings, "notify::gtk-application-prefer-dark-theme", G_CALLBACK(DarkModeChanged), nullptr);
|
||||
}
|
||||
|
||||
if (!gtk_check_version(3, 12, 0)) {
|
||||
g_signal_connect(settings, "notify::gtk-decoration-layout", G_CALLBACK(DecorationLayoutChanged), nullptr);
|
||||
}
|
||||
} else {
|
||||
LOG(("Could not load gtk-3 or gtk-x11-2.0!"));
|
||||
}
|
||||
|
Reference in New Issue
Block a user