From 2dbd7bf7ffc34b83ed1791562591e4927dd49543 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E7=94=B0=E4=B8=83=E4=B8=8D=E7=94=9C?= <1633557643@qq.com> Date: Sun, 20 Aug 2023 19:01:13 +0800 Subject: [PATCH] UI: Add stream key tooltip in the auto-config wizard --- UI/window-basic-auto-config.cpp | 17 ++++++++++++++++- 1 file changed, 16 insertions(+), 1 deletion(-) diff --git a/UI/window-basic-auto-config.cpp b/UI/window-basic-auto-config.cpp index 235780812..d8ddbfa44 100644 --- a/UI/window-basic-auto-config.cpp +++ b/UI/window-basic-auto-config.cpp @@ -731,9 +731,24 @@ void AutoConfigStreamPage::UpdateKeyLink() if (serviceName == "Dacast") { ui->streamKeyLabel->setText( QTStr("Basic.AutoConfig.StreamPage.EncoderKey")); - } else { + ui->streamKeyLabel->setToolTip(""); + } else if (!IsCustomService()) { ui->streamKeyLabel->setText( QTStr("Basic.AutoConfig.StreamPage.StreamKey")); + ui->streamKeyLabel->setToolTip(""); + } else { + /* add tooltips for stream key */ + QString file = !App()->IsThemeDark() + ? ":/res/images/help.svg" + : ":/res/images/help_light.svg"; + QString lStr = "%1 "; + + ui->streamKeyLabel->setText(lStr.arg( + QTStr("Basic.AutoConfig.StreamPage.StreamKey"), file)); + ui->streamKeyLabel->setToolTip( + QTStr("Basic.AutoConfig.StreamPage.StreamKey.ToolTip")); } if (QString(streamKeyLink).isNull() ||