Add HelpIcon

A QLabel consisting of a question mark icon and tooltip
This commit is contained in:
WarmUpTill
2024-06-06 19:41:19 +02:00
committed by WarmUpTill
parent 0e4b000fb1
commit 7e1d20031c
13 changed files with 57 additions and 63 deletions

View File

@@ -6,7 +6,6 @@
#include "macro.hpp"
#include "non-modal-dialog.hpp"
#include "source-helpers.hpp"
#include "ui-helpers.hpp"
#include "utility.hpp"
namespace advss {
@@ -644,7 +643,8 @@ MacroActionVariableEdit::MacroActionVariableEdit(
_scenes(new SceneSelectionWidget(this, true, false, true, true,
true)),
_tempVars(new TempVariableSelection(this)),
_tempVarsHelp(new QLabel()),
_tempVarsHelp(new HelpIcon(obs_module_text(
"AdvSceneSwitcher.action.variable.type.setToTempvar.help"))),
_sceneItemIndex(new VariableSpinBox()),
_direction(new QComboBox()),
_stringLength(new VariableSpinBox()),
@@ -672,15 +672,6 @@ MacroActionVariableEdit::MacroActionVariableEdit(
populateTypeSelection(_actions);
populateDirectionSelection(_direction);
QString path = GetThemeTypeName() == "Light"
? ":/res/images/help.svg"
: ":/res/images/help_light.svg";
QIcon icon(path);
QPixmap pixmap = icon.pixmap(QSize(16, 16));
_tempVarsHelp->setPixmap(pixmap);
_tempVarsHelp->setToolTip(obs_module_text(
"AdvSceneSwitcher.action.variable.type.setToTempvar.help"));
QWidget::connect(_variables, SIGNAL(SelectionChanged(const QString &)),
this, SLOT(VariableChanged(const QString &)));
QWidget::connect(_variables2, SIGNAL(SelectionChanged(const QString &)),