Permalink
Browse files

Merge pull request #7037 from spycrab/qt_adapter_tooltip

Qt/GeneralWidget: Show tooltip when adapters are not supported by the backend
  • Loading branch information...
spycrab committed May 31, 2018
2 parents 9337aa4 + 8e5a96f commit 5f48c9fc01121982ad8b891a4ca6e126585dbd2d
Showing with 8 additions and 1 deletion.
  1. +8 −1 Source/Core/DolphinQt2/Config/Graphics/GeneralWidget.cpp
@@ -338,8 +338,15 @@ void GeneralWidget::OnBackendChanged(const QString& backend_name)
for (const auto& adapter : adapters)
m_adapter_combo->addItem(QString::fromStdString(adapter));
const bool supports_adapters = !adapters.empty();
m_adapter_combo->setCurrentIndex(g_Config.iAdapter);
m_adapter_combo->setEnabled(!adapters.empty());
m_adapter_combo->setEnabled(supports_adapters);
m_adapter_combo->setToolTip(
supports_adapters ? QStringLiteral("") :
tr("%1 doesn't support this feature.")
.arg(QString::fromStdString(g_video_backend->GetDisplayName())));
m_adapter_combo->blockSignals(old);
}

0 comments on commit 5f48c9f

Please sign in to comment.