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>
This commit is contained in:
parent
8f0d2e2874
commit
b3b6dd49ba
@ -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;
|
||||
}
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user