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:
@@ -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
|
||||
|
||||
|
Reference in New Issue
Block a user