2
0
mirror of https://github.com/telegramdesktop/tdesktop synced 2025-09-09 02:46:34 +00:00

Fallback to portal on Linux if QStyleHints::colorScheme is unknown

This commit is contained in:
Ilya Fedin
2024-10-12 09:58:40 +04:00
committed by John Preston
parent f2e0e481de
commit a88f48cd93
3 changed files with 45 additions and 16 deletions

View File

@@ -536,13 +536,7 @@ QString SingleInstanceLocalServerName(const QString &hash) {
#if QT_VERSION < QT_VERSION_CHECK(6, 5, 0)
std::optional<bool> IsDarkMode() {
auto result = base::Platform::XDP::ReadSetting(
"org.freedesktop.appearance",
"color-scheme");
return result.has_value()
? std::make_optional(result->get_uint32() == 1)
: std::nullopt;
return std::nullopt;
}
#endif // Qt < 6.5.0