mirror of
https://github.com/WarmUpTill/SceneSwitcher.git
synced 2026-09-08 01:26:04 -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:
@@ -143,10 +143,6 @@ RandomSwitchWidget::RandomSwitchWidget(RandomSwitch *s) : SwitchWidget(s, false)
|
||||
{
|
||||
delay = new QDoubleSpinBox();
|
||||
|
||||
switchLabel = new QLabel("If no switch condition is met switch to ");
|
||||
usingLabel = new QLabel("using");
|
||||
forLabel = new QLabel("for");
|
||||
|
||||
QWidget::connect(delay, SIGNAL(valueChanged(double)), this,
|
||||
SLOT(DelayChanged(double)));
|
||||
|
||||
@@ -160,15 +156,12 @@ RandomSwitchWidget::RandomSwitchWidget(RandomSwitch *s) : SwitchWidget(s, false)
|
||||
setStyleSheet("* { background-color: transparent; }");
|
||||
|
||||
QHBoxLayout *mainLayout = new QHBoxLayout;
|
||||
|
||||
mainLayout->addWidget(switchLabel);
|
||||
mainLayout->addWidget(scenes);
|
||||
mainLayout->addWidget(usingLabel);
|
||||
mainLayout->addWidget(transitions);
|
||||
mainLayout->addWidget(forLabel);
|
||||
mainLayout->addWidget(delay);
|
||||
mainLayout->addStretch();
|
||||
|
||||
std::unordered_map<std::string, QWidget *> widgetPlaceholders = {
|
||||
{"{{scenes}}", scenes},
|
||||
{"{{transitions}}", transitions},
|
||||
{"{{delay}}", delay}};
|
||||
placeWidgets(obs_module_text("AdvSceneSwitcher.randomTab.entry"),
|
||||
mainLayout, widgetPlaceholders);
|
||||
setLayout(mainLayout);
|
||||
|
||||
switchData = s;
|
||||
|
||||
Reference in New Issue
Block a user