mirror of
https://github.com/WarmUpTill/SceneSwitcher.git
synced 2026-09-07 17:16: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:
@@ -330,11 +330,6 @@ AudioSwitchWidget::AudioSwitchWidget(AudioSwitch *s) : SwitchWidget(s)
|
||||
volMeter = new VolControl(soruce);
|
||||
obs_source_release(soruce);
|
||||
|
||||
whenLabel = new QLabel("When the volume of");
|
||||
aboveLabel = new QLabel("is above");
|
||||
switchLabel = new QLabel("switch to");
|
||||
usingLabel = new QLabel("using");
|
||||
|
||||
audioVolumeThreshold->setSuffix("%");
|
||||
audioVolumeThreshold->setMaximum(100);
|
||||
audioVolumeThreshold->setMinimum(0);
|
||||
@@ -360,16 +355,13 @@ AudioSwitchWidget::AudioSwitchWidget(AudioSwitch *s) : SwitchWidget(s)
|
||||
setStyleSheet("* { background-color: transparent; }");
|
||||
|
||||
QHBoxLayout *switchLayout = new QHBoxLayout;
|
||||
|
||||
switchLayout->addWidget(whenLabel);
|
||||
switchLayout->addWidget(audioSources);
|
||||
switchLayout->addWidget(aboveLabel);
|
||||
switchLayout->addWidget(audioVolumeThreshold);
|
||||
switchLayout->addWidget(switchLabel);
|
||||
switchLayout->addWidget(scenes);
|
||||
switchLayout->addWidget(usingLabel);
|
||||
switchLayout->addWidget(transitions);
|
||||
switchLayout->addStretch();
|
||||
std::unordered_map<std::string, QWidget *> widgetPlaceholders = {
|
||||
{"{{audioSources}}", audioSources},
|
||||
{"{{volumeWidget}}", audioVolumeThreshold},
|
||||
{"{{scenes}}", scenes},
|
||||
{"{{transitions}}", transitions}};
|
||||
placeWidgets(obs_module_text("AdvSceneSwitcher.audioTab.entry"),
|
||||
switchLayout, widgetPlaceholders);
|
||||
|
||||
QVBoxLayout *mainLayout = new QVBoxLayout;
|
||||
|
||||
|
||||
Reference in New Issue
Block a user