mirror of
https://github.com/WarmUpTill/SceneSwitcher.git
synced 2026-08-30 05:06:14 -05:00
Add tooltips for variable text inputs (#888)
This commit is contained in:
@@ -1,11 +1,15 @@
|
||||
#include "variable-text-edit.hpp"
|
||||
#include "switcher-data.hpp"
|
||||
|
||||
#include <obs-module.h>
|
||||
|
||||
namespace advss {
|
||||
|
||||
VariableTextEdit::VariableTextEdit(QWidget *parent)
|
||||
: ResizingPlainTextEdit(parent)
|
||||
{
|
||||
QPlainTextEdit::setToolTip(
|
||||
obs_module_text("AdvSceneSwitcher.tooltip.availableVariables"));
|
||||
}
|
||||
|
||||
void VariableTextEdit::setPlainText(const QString &string)
|
||||
@@ -19,4 +23,11 @@ void VariableTextEdit::setPlainText(const StringVariable &string)
|
||||
QString::fromStdString(string.UnresolvedValue()));
|
||||
}
|
||||
|
||||
void VariableTextEdit::setToolTip(const QString &string)
|
||||
{
|
||||
QPlainTextEdit::setToolTip(
|
||||
string + "\n" +
|
||||
obs_module_text("AdvSceneSwitcher.tooltip.availableVariables"));
|
||||
}
|
||||
|
||||
} // namespace advss
|
||||
|
||||
Reference in New Issue
Block a user