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:
@@ -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);
|
||||
|
Reference in New Issue
Block a user