implemented software fallback for text effect

This commit is contained in:
itsmattkc
2019-01-19 04:00:02 +11:00
parent d433289b4a
commit 20f4b8d4c7
5 changed files with 117 additions and 5 deletions
+21
View File
@@ -120,6 +120,8 @@ void PreferencesDialog::save() {
return;
}
bool needs_restart = false;
config.css_path = custom_css_fn->text();
mainWindow->load_css_from_file(config.css_path);
config.recording_mode = recordingComboBox->currentIndex() + 1;
@@ -130,13 +132,26 @@ void PreferencesDialog::save() {
config.upcoming_queue_type = upcoming_queue_type->currentIndex();
config.previous_queue_size = previous_queue_spinbox->value();
config.previous_queue_type = previous_queue_type->currentIndex();
if (config.effect_textbox_lines != effect_textbox_lines_field->value()) {
needs_restart = true;
}
config.effect_textbox_lines = effect_textbox_lines_field->value();
if (config.use_software_fallback != use_software_fallbacks_checkbox->isChecked()) {
needs_restart = true;
}
config.use_software_fallback = use_software_fallbacks_checkbox->isChecked();
// save keyboard shortcuts
for (int i=0;i<key_shortcut_fields.size();i++) {
key_shortcut_fields.at(i)->set_action_shortcut();
}
if (needs_restart) {
QMessageBox::information(this, tr("Warning"), tr("Some changed settings will require restarting Olive to take effect"));
}
accept();
}
@@ -304,6 +319,12 @@ void PreferencesDialog::setup_ui() {
effect_textbox_lines_field->setValue(config.effect_textbox_lines);
general_layout->addWidget(effect_textbox_lines_field, 3, 1, 1, 2);
// General -> Use Software Fallbacks When Possible
use_software_fallbacks_checkbox = new QCheckBox(general_tab);
use_software_fallbacks_checkbox->setText(tr("Use Software Fallbacks When Possible"));
use_software_fallbacks_checkbox->setChecked(config.use_software_fallback);
general_layout->addWidget(use_software_fallbacks_checkbox, 4, 0, 1, 1);
tabWidget->addTab(general_tab, tr("General"));
// Behavior