summaryrefslogtreecommitdiff
path: root/Source/Core/DolphinQt/Config/Graphics/GeneralWidget.cpp
diff options
context:
space:
mode:
authorLéo Lam <leo@leolam.fr>2021-07-13 03:33:42 +0200
committerGitHub <noreply@github.com>2021-07-13 03:33:42 +0200
commitb0d2df727a3ab3455bca30c4d16072a9c9f290dd (patch)
tree5e1df07b554564e55bfd16cef3066a76101a095b /Source/Core/DolphinQt/Config/Graphics/GeneralWidget.cpp
parentde54856fbb9476e8a348fabb2aa41a0d4e6fdcbe (diff)
parent59292a5c65a24c93bfa2436d5bb553f1a4bc01ba (diff)
Merge pull request #9686 from Dentomologist/convert_adapter_tooltip_to_balloontip
GeneralWidget: Convert Adapter tooltip to BalloonTip
Diffstat (limited to 'Source/Core/DolphinQt/Config/Graphics/GeneralWidget.cpp')
-rw-r--r--Source/Core/DolphinQt/Config/Graphics/GeneralWidget.cpp19
1 files changed, 11 insertions, 8 deletions
diff --git a/Source/Core/DolphinQt/Config/Graphics/GeneralWidget.cpp b/Source/Core/DolphinQt/Config/Graphics/GeneralWidget.cpp
index fe6a513e74..f25dc8b21b 100644
--- a/Source/Core/DolphinQt/Config/Graphics/GeneralWidget.cpp
+++ b/Source/Core/DolphinQt/Config/Graphics/GeneralWidget.cpp
@@ -203,9 +203,6 @@ void GeneralWidget::AddDescriptions()
"backend, so for the best emulation experience it is recommended to try each and "
"select the backend that is least problematic.<br><br><dolphin_emphasis>If unsure, "
"select OpenGL.</dolphin_emphasis>");
- static const char TR_ADAPTER_DESCRIPTION[] =
- QT_TR_NOOP("Selects a hardware adapter to use.<br><br><dolphin_emphasis>If unsure, "
- "select the first one.</dolphin_emphasis>");
static const char TR_FULLSCREEN_DESCRIPTION[] =
QT_TR_NOOP("Uses the entire screen for rendering.<br><br>If disabled, a "
"render window will be created instead.<br><br><dolphin_emphasis>If "
@@ -274,7 +271,6 @@ void GeneralWidget::AddDescriptions()
m_backend_combo->SetDescription(tr(TR_BACKEND_DESCRIPTION));
m_adapter_combo->SetTitle(tr("Adapter"));
- m_adapter_combo->SetDescription(tr(TR_ADAPTER_DESCRIPTION));
m_aspect_combo->SetTitle(tr("Aspect Ratio"));
m_aspect_combo->SetDescription(tr(TR_ASPECT_RATIO_DESCRIPTION));
@@ -324,8 +320,15 @@ void GeneralWidget::OnBackendChanged(const QString& backend_name)
m_adapter_combo->setCurrentIndex(g_Config.iAdapter);
m_adapter_combo->setEnabled(supports_adapters && !Core::IsRunning());
- m_adapter_combo->setToolTip(supports_adapters ?
- QString{} :
- tr("%1 doesn't support this feature.")
- .arg(tr(g_video_backend->GetDisplayName().c_str())));
+ static constexpr char TR_ADAPTER_AVAILABLE_DESCRIPTION[] =
+ QT_TR_NOOP("Selects a hardware adapter to use.<br><br>"
+ "<dolphin_emphasis>If unsure, select the first one.</dolphin_emphasis>");
+ static constexpr char TR_ADAPTER_UNAVAILABLE_DESCRIPTION[] =
+ QT_TR_NOOP("Selects a hardware adapter to use.<br><br>"
+ "<dolphin_emphasis>%1 doesn't support this feature.</dolphin_emphasis>");
+
+ m_adapter_combo->SetDescription(supports_adapters ?
+ tr(TR_ADAPTER_AVAILABLE_DESCRIPTION) :
+ tr(TR_ADAPTER_UNAVAILABLE_DESCRIPTION)
+ .arg(tr(g_video_backend->GetDisplayName().c_str())));
}