UI: Use icons for hotkey buttons
This commit is contained in:
parent
d17e261d23
commit
b2e0d93990
@ -985,3 +985,11 @@ VisibilityCheckBox::indicator:checked:hover {
|
||||
VisibilityCheckBox::indicator:unchecked:hover {
|
||||
image: url(:res/images/invisible.svg);
|
||||
}
|
||||
|
||||
* [themeID="trashIcon"] {
|
||||
qproperty-icon: url(./Dark/trash.svg);
|
||||
}
|
||||
|
||||
* [themeID="revertIcon"] {
|
||||
qproperty-icon: url(./Dark/revert.svg);
|
||||
}
|
||||
|
@ -708,3 +708,11 @@ VisibilityCheckBox::indicator:checked {
|
||||
VisibilityCheckBox::indicator:unchecked {
|
||||
image: url(:res/images/invisible.svg);
|
||||
}
|
||||
|
||||
* [themeID="trashIcon"] {
|
||||
qproperty-icon: url(./Dark/trash.svg);
|
||||
}
|
||||
|
||||
* [themeID="revertIcon"] {
|
||||
qproperty-icon: url(./Dark/revert.svg);
|
||||
}
|
||||
|
1
UI/data/themes/Dark/revert.svg
Normal file
1
UI/data/themes/Dark/revert.svg
Normal file
@ -0,0 +1 @@
|
||||
<svg xmlns="http://www.w3.org/2000/svg" width="24" height="24" viewBox="0 0 24 24" fill="none" stroke="#d2d2d2" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" class="feather feather-rotate-ccw"><polyline points="1 4 1 10 7 10"></polyline><path d="M3.51 15a9 9 0 1 0 2.13-9.36L1 10"></path></svg>
|
After Width: | Height: | Size: 313 B |
1
UI/data/themes/Dark/trash.svg
Normal file
1
UI/data/themes/Dark/trash.svg
Normal file
@ -0,0 +1 @@
|
||||
<svg xmlns="http://www.w3.org/2000/svg" width="24" height="24" viewBox="0 0 24 24" fill="none" stroke="#d2d2d2" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" class="feather feather-trash-2"><polyline points="3 6 5 6 21 6"></polyline><path d="M19 6v14a2 2 0 0 1-2 2H7a2 2 0 0 1-2-2V6m3 0V4a2 2 0 0 1 2-2h4a2 2 0 0 1 2 2v2"></path><line x1="10" y1="11" x2="10" y2="17"></line><line x1="14" y1="11" x2="14" y2="17"></line></svg>
|
After Width: | Height: | Size: 444 B |
@ -1339,3 +1339,11 @@ VisibilityCheckBox::indicator:checked:hover {
|
||||
VisibilityCheckBox::indicator:unchecked:hover {
|
||||
image: url(:res/images/invisible.svg);
|
||||
}
|
||||
|
||||
* [themeID="trashIcon"] {
|
||||
qproperty-icon: url(./Dark/trash.svg);
|
||||
}
|
||||
|
||||
* [themeID="revertIcon"] {
|
||||
qproperty-icon: url(./Dark/revert.svg);
|
||||
}
|
||||
|
@ -191,3 +191,11 @@ VisibilityCheckBox::indicator:checked {
|
||||
VisibilityCheckBox::indicator:unchecked {
|
||||
image: url(:res/images/invisible.svg);
|
||||
}
|
||||
|
||||
* [themeID="trashIcon"] {
|
||||
qproperty-icon: url(:res/images/trash.svg);
|
||||
}
|
||||
|
||||
* [themeID="revertIcon"] {
|
||||
qproperty-icon: url(:res/images/revert.svg);
|
||||
}
|
||||
|
1
UI/forms/images/revert.svg
Normal file
1
UI/forms/images/revert.svg
Normal file
@ -0,0 +1 @@
|
||||
<svg xmlns="http://www.w3.org/2000/svg" width="24" height="24" viewBox="0 0 24 24" fill="none" stroke="#000000" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" class="feather feather-rotate-ccw"><polyline points="1 4 1 10 7 10"></polyline><path d="M3.51 15a9 9 0 1 0 2.13-9.36L1 10"></path></svg>
|
After Width: | Height: | Size: 313 B |
1
UI/forms/images/trash.svg
Normal file
1
UI/forms/images/trash.svg
Normal file
@ -0,0 +1 @@
|
||||
<svg xmlns="http://www.w3.org/2000/svg" width="24" height="24" viewBox="0 0 24 24" fill="none" stroke="#000000" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" class="feather feather-trash-2"><polyline points="3 6 5 6 21 6"></polyline><path d="M19 6v14a2 2 0 0 1-2 2H7a2 2 0 0 1-2-2V6m3 0V4a2 2 0 0 1 2-2h4a2 2 0 0 1 2 2v2"></path><line x1="10" y1="11" x2="10" y2="17"></line><line x1="14" y1="11" x2="14" y2="17"></line></svg>
|
After Width: | Height: | Size: 444 B |
@ -14,6 +14,8 @@
|
||||
<file>images/locked.svg</file>
|
||||
<file>images/invisible.svg</file>
|
||||
<file>images/visible.svg</file>
|
||||
<file>images/trash.svg</file>
|
||||
<file>images/revert.svg</file>
|
||||
</qresource>
|
||||
<qresource prefix="/settings">
|
||||
<file>images/settings/output.svg</file>
|
||||
|
@ -272,13 +272,17 @@ 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->setProperty("themeID", "revertIcon");
|
||||
revert->setToolTip(QTStr("Revert"));
|
||||
revert->setFixedSize(24, 24);
|
||||
revert->setStyleSheet("background: transparent; border: none;");
|
||||
revert->setEnabled(false);
|
||||
|
||||
auto clear = new QPushButton;
|
||||
clear->setProperty("themeID", "hotkeyButtons");
|
||||
clear->setText(QTStr("Clear"));
|
||||
clear->setProperty("themeID", "trashIcon");
|
||||
clear->setToolTip(QTStr("Clear"));
|
||||
clear->setFixedSize(24, 24);
|
||||
clear->setStyleSheet("background: transparent; border: none;");
|
||||
clear->setEnabled(!obs_key_combination_is_empty(combo));
|
||||
|
||||
QObject::connect(edit, &OBSHotkeyEdit::KeyChanged,
|
||||
@ -289,15 +293,15 @@ void OBSHotkeyWidget::AddEdit(obs_key_combination combo, int idx)
|
||||
});
|
||||
|
||||
auto add = new QPushButton;
|
||||
add->setProperty("themeID", "hotkeyButtons");
|
||||
add->setText("+");
|
||||
add->setMinimumWidth(50);
|
||||
add->setProperty("themeID", "addIconSmall");
|
||||
add->setFixedSize(24, 24);
|
||||
add->setStyleSheet("background: transparent; border: none;");
|
||||
|
||||
auto remove = new QPushButton;
|
||||
remove->setProperty("themeID", "hotkeyButtons");
|
||||
remove->setText("-");
|
||||
remove->setProperty("themeID", "removeIconSmall");
|
||||
remove->setEnabled(removeButtons.size() > 0);
|
||||
remove->setMinimumWidth(50);
|
||||
remove->setFixedSize(24, 24);
|
||||
remove->setStyleSheet("background: transparent; border: none;");
|
||||
|
||||
auto CurrentIndex = [&, remove]
|
||||
{
|
||||
|
Loading…
x
Reference in New Issue
Block a user