Fix for issue QTBUG-123722 introduced in Qt 6.7.0.
This commit is contained in:
parent
56859de79d
commit
730c6d3de5
|
@ -135,7 +135,16 @@ void ActivateCustomDarkTheme()
|
||||||
void ActivateDefaultThemeWin()
|
void ActivateDefaultThemeWin()
|
||||||
{
|
{
|
||||||
#if QT_VERSION >= QT_VERSION_CHECK(6, 5, 0)
|
#if QT_VERSION >= QT_VERSION_CHECK(6, 5, 0)
|
||||||
|
// Fix for issue QTBUG-123722
|
||||||
|
#if QT_VERSION == QT_VERSION_CHECK(6, 7, 0)
|
||||||
|
if (!VTheme::IsInDarkTheme())
|
||||||
|
{
|
||||||
|
// NOLINTNEXTLINE(cppcoreguidelines-pro-type-static-cast-downcast)
|
||||||
|
qApp->setStyleSheet(QStringLiteral("QComboBox QAbstractItemView {background-color: white}"));
|
||||||
|
}
|
||||||
|
#else
|
||||||
qApp->setStyleSheet(QString()); // NOLINT(cppcoreguidelines-pro-type-static-cast-downcast)
|
qApp->setStyleSheet(QString()); // NOLINT(cppcoreguidelines-pro-type-static-cast-downcast)
|
||||||
|
#endif
|
||||||
#else
|
#else
|
||||||
if (VTheme::IsInDarkTheme())
|
if (VTheme::IsInDarkTheme())
|
||||||
{
|
{
|
||||||
|
@ -357,7 +366,16 @@ void VTheme::SetIconTheme()
|
||||||
//---------------------------------------------------------------------------------------------------------------------
|
//---------------------------------------------------------------------------------------------------------------------
|
||||||
void VTheme::SetToAutoTheme() const
|
void VTheme::SetToAutoTheme() const
|
||||||
{
|
{
|
||||||
|
// Fix for issue QTBUG-123722
|
||||||
|
#if defined(Q_OS_WIN) && QT_VERSION == QT_VERSION_CHECK(6, 7, 0)
|
||||||
|
if (!IsInDarkTheme())
|
||||||
|
{
|
||||||
|
// NOLINTNEXTLINE(cppcoreguidelines-pro-type-static-cast-downcast)
|
||||||
|
qApp->setStyleSheet(QStringLiteral("QComboBox QAbstractItemView {background-color: white}"));
|
||||||
|
}
|
||||||
|
#else
|
||||||
qApp->setStyleSheet(QString()); // NOLINT(cppcoreguidelines-pro-type-static-cast-downcast)
|
qApp->setStyleSheet(QString()); // NOLINT(cppcoreguidelines-pro-type-static-cast-downcast)
|
||||||
|
#endif
|
||||||
QIcon::setThemeName(m_defaultThemeName);
|
QIcon::setThemeName(m_defaultThemeName);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue
Block a user