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

This reverts commit a88f48cd93.
This commit is contained in:
Ilya Fedin
2025-01-25 16:17:34 +04:00
committed by John Preston
parent d3142ebe6d
commit 39b90092ff
3 changed files with 16 additions and 45 deletions
@@ -535,7 +535,13 @@ QString SingleInstanceLocalServerName(const QString &hash) {
#if QT_VERSION < QT_VERSION_CHECK(6, 5, 0)
std::optional<bool> IsDarkMode() {
return std::nullopt;
auto result = base::Platform::XDP::ReadSetting(
"org.freedesktop.appearance",
"color-scheme");
return result.has_value()
? std::make_optional(result->get_uint32() == 1)
: std::nullopt;
}
#endif // Qt < 6.5.0