mirror of
https://github.com/WarmUpTill/SceneSwitcher.git
synced 2026-09-07 00:56:00 -05:00
I18n Support (#72)
* adapt UI for i18n * add placeWidgets() helper function to ease translation * add hint about Transition Matrix plugin on Transition tab * translate * rework UI of file tab * write status of plugin to scene info file
This commit is contained in:
@@ -418,10 +418,6 @@ TransitionSwitchWidget::TransitionSwitchWidget(SceneTransition *s)
|
||||
{
|
||||
scenes2 = new QComboBox();
|
||||
|
||||
switchLabel = new QLabel("Switch from scene");
|
||||
toLabel = new QLabel("to scene");
|
||||
usingLabel = new QLabel("using transition");
|
||||
|
||||
QWidget::connect(scenes2, SIGNAL(currentTextChanged(const QString &)),
|
||||
this, SLOT(Scene2Changed(const QString &)));
|
||||
|
||||
@@ -434,15 +430,12 @@ TransitionSwitchWidget::TransitionSwitchWidget(SceneTransition *s)
|
||||
setStyleSheet("* { background-color: transparent; }");
|
||||
|
||||
QHBoxLayout *mainLayout = new QHBoxLayout;
|
||||
|
||||
mainLayout->addWidget(switchLabel);
|
||||
mainLayout->addWidget(scenes);
|
||||
mainLayout->addWidget(toLabel);
|
||||
mainLayout->addWidget(scenes2);
|
||||
mainLayout->addWidget(usingLabel);
|
||||
mainLayout->addWidget(transitions);
|
||||
mainLayout->addStretch();
|
||||
|
||||
std::unordered_map<std::string, QWidget *> widgetPlaceholders = {
|
||||
{"{{scenes}}", scenes},
|
||||
{"{{scenes2}}", scenes2},
|
||||
{"{{transitions}}", transitions}};
|
||||
placeWidgets(obs_module_text("AdvSceneSwitcher.transitionTab.entry"),
|
||||
mainLayout, widgetPlaceholders);
|
||||
setLayout(mainLayout);
|
||||
|
||||
switchData = s;
|
||||
@@ -481,20 +474,15 @@ void TransitionSwitchWidget::Scene2Changed(const QString &text)
|
||||
DefTransitionSwitchWidget::DefTransitionSwitchWidget(DefaultSceneTransition *s)
|
||||
: SwitchWidget(s, false)
|
||||
{
|
||||
whenLabel = new QLabel("When scene");
|
||||
switchLabel =
|
||||
new QLabel("is active change default scene transition to ");
|
||||
|
||||
setStyleSheet("* { background-color: transparent; }");
|
||||
|
||||
QHBoxLayout *mainLayout = new QHBoxLayout;
|
||||
|
||||
mainLayout->addWidget(whenLabel);
|
||||
mainLayout->addWidget(scenes);
|
||||
mainLayout->addWidget(switchLabel);
|
||||
mainLayout->addWidget(transitions);
|
||||
mainLayout->addStretch();
|
||||
|
||||
std::unordered_map<std::string, QWidget *> widgetPlaceholders = {
|
||||
{"{{scenes}}", scenes}, {"{{transitions}}", transitions}};
|
||||
placeWidgets(
|
||||
obs_module_text(
|
||||
"AdvSceneSwitcher.transitionTab.defaultTransitionEntry"),
|
||||
mainLayout, widgetPlaceholders);
|
||||
setLayout(mainLayout);
|
||||
|
||||
switchData = s;
|
||||
|
||||
Reference in New Issue
Block a user