mirror of
https://github.com/telegramdesktop/tdesktop
synced 2025-08-31 06:26:18 +00:00
Make dark mode update go through Qt code on Linux
This makes the behavior consistent and is possible now thanks to a Qt patch
This commit is contained in:
@@ -16,6 +16,7 @@ https://github.com/telegramdesktop/tdesktop/blob/master/LEGAL
|
||||
#include "base/random.h"
|
||||
|
||||
#include <QtCore/QAbstractEventDispatcher>
|
||||
#include <qpa/qwindowsysteminterface.h>
|
||||
|
||||
#include <glibmm.h>
|
||||
#include <gio/gio.hpp>
|
||||
@@ -212,6 +213,9 @@ LinuxIntegration::LinuxIntegration()
|
||||
const Glib::VariantBase &value) {
|
||||
if (group == "org.freedesktop.appearance"
|
||||
&& key == "color-scheme") {
|
||||
#if QT_VERSION >= QT_VERSION_CHECK(6, 5, 0)
|
||||
QWindowSystemInterface::handleThemeChange();
|
||||
#else // Qt >= 6.5.0
|
||||
try {
|
||||
const auto ivalue = value.get_dynamic<uint>();
|
||||
|
||||
@@ -220,6 +224,7 @@ LinuxIntegration::LinuxIntegration()
|
||||
});
|
||||
} catch (...) {
|
||||
}
|
||||
#endif // Qt < 6.5.0
|
||||
}
|
||||
}) {
|
||||
LOG(("Icon theme: %1").arg(QIcon::themeName()));
|
||||
|
Reference in New Issue
Block a user