UI: Add new theme, update theme capabilities

I have always felt that the out of the box themes for OBS were quite
lacking, and have spent a lot of time going through and sorting out the
difficulties with the current setup. I've added a new themeID parameter to
several elements that were otherwise impossible to target with QSS in a
theme. Since Qt has pushed for the use of QML over QSS at this point,
these should be considered workarounds. Included is the theme I was
working on that can serve as a base. I'm hoping to encourage others to
make their own themes, so we can grow the available themes for OBS.

I am happy for any feedback on the theme itself, or other updates that
can me made to make creating new themes easier overall.
This commit is contained in:
Joel Bethke
2017-06-13 14:34:05 -05:00
parent f093028d7a
commit 432e285257
25 changed files with 1031 additions and 0 deletions

View File

@@ -272,10 +272,12 @@ void OBSHotkeyWidget::AddEdit(obs_key_combination combo, int idx)
edit->setToolTip(toolTip);
auto revert = new QPushButton;
revert->setProperty("themeID", "hotkeyButtons");
revert->setText(QTStr("Revert"));
revert->setEnabled(false);
auto clear = new QPushButton;
clear->setProperty("themeID", "hotkeyButtons");
clear->setText(QTStr("Clear"));
clear->setEnabled(!obs_key_combination_is_empty(combo));
@@ -287,10 +289,12 @@ void OBSHotkeyWidget::AddEdit(obs_key_combination combo, int idx)
});
auto add = new QPushButton;
add->setProperty("themeID", "hotkeyButtons");
add->setText("+");
add->setMinimumWidth(50);
auto remove = new QPushButton;
remove->setProperty("themeID", "hotkeyButtons");
remove->setText("-");
remove->setEnabled(removeButtons.size() > 0);
remove->setMinimumWidth(50);