summaryrefslogtreecommitdiffstats
path: root/src/plugins/platformthemes/xdgdesktopportal/qxdgdesktopportaltheme.cpp
diff options
context:
space:
mode:
authorIlya Fedin <fedin-ilja2010@ya.ru>2023-05-29 19:06:48 +0400
committerIlya Fedin <fedin-ilja2010@ya.ru>2023-05-30 23:42:44 +0400
commitb3b6dd49baa3fa19e6c635005c091eacb4789e58 (patch)
treef506f5af555d2939fa46f64b2dd7a54d28dfad03 /src/plugins/platformthemes/xdgdesktopportal/qxdgdesktopportaltheme.cpp
parent8f0d2e287468e07cfa5cd70273d57a7d78076a3e (diff)
xdgdesktopportal: Fallback to base theme if color scheme is unknown
This should be better than returning unknown if xdg-desktop-portal is not running or its backend doesn't know color scheme This also matches the pratice of all other QXdgDesktopPortalTheme methods Pick-to: 6.5 Change-Id: I352e091a019bc5b683c3f1dad223e55717888d02 Reviewed-by: Jan Grulich <jgrulich@redhat.com> Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
Diffstat (limited to 'src/plugins/platformthemes/xdgdesktopportal/qxdgdesktopportaltheme.cpp')
-rw-r--r--src/plugins/platformthemes/xdgdesktopportal/qxdgdesktopportaltheme.cpp2
1 files changed, 2 insertions, 0 deletions
diff --git a/src/plugins/platformthemes/xdgdesktopportal/qxdgdesktopportaltheme.cpp b/src/plugins/platformthemes/xdgdesktopportal/qxdgdesktopportaltheme.cpp
index 2f46b53297..a31c8b6105 100644
--- a/src/plugins/platformthemes/xdgdesktopportal/qxdgdesktopportaltheme.cpp
+++ b/src/plugins/platformthemes/xdgdesktopportal/qxdgdesktopportaltheme.cpp
@@ -208,6 +208,8 @@ QVariant QXdgDesktopPortalTheme::themeHint(ThemeHint hint) const
Qt::ColorScheme QXdgDesktopPortalTheme::colorScheme() const
{
Q_D(const QXdgDesktopPortalTheme);
+ if (d->colorScheme == Qt::ColorScheme::Unknown)
+ return d->baseTheme->colorScheme();
return d->colorScheme;
}