From a7419a9809a1821e8c18d646ad1eb8fea95c5df2 Mon Sep 17 00:00:00 2001 From: gxalpha Date: Sat, 20 Aug 2022 04:18:25 +0200 Subject: [PATCH] UI: Use backspace icon to indicate "Clear" in hotkey-edit --- UI/data/themes/Acri.qss | 4 ++++ UI/data/themes/Dark.qss | 4 ++++ UI/data/themes/Dark/entry-clear.svg | 4 ++++ UI/data/themes/Grey.qss | 4 ++++ UI/data/themes/Light.qss | 4 ++++ UI/data/themes/Light/entry-clear.svg | 4 ++++ UI/data/themes/Rachni.qss | 4 ++++ UI/data/themes/System.qss | 4 ++++ UI/data/themes/Yami.qss | 4 ++++ UI/forms/images/entry-clear.svg | 4 ++++ UI/forms/obs.qrc | 1 + UI/hotkey-edit.cpp | 2 +- 12 files changed, 42 insertions(+), 1 deletion(-) create mode 100644 UI/data/themes/Dark/entry-clear.svg create mode 100644 UI/data/themes/Light/entry-clear.svg create mode 100644 UI/forms/images/entry-clear.svg diff --git a/UI/data/themes/Acri.qss b/UI/data/themes/Acri.qss index 7f838057c..e6ac9ea14 100644 --- a/UI/data/themes/Acri.qss +++ b/UI/data/themes/Acri.qss @@ -454,6 +454,10 @@ QToolButton:pressed { qproperty-icon: url(./Dark/trash.svg); } +* [themeID="clearIconSmall"] { + qproperty-icon: url(./Dark/entry-clear.svg); +} + * [themeID="propertiesIconSmall"] { qproperty-icon: url(./Dark/settings/general.svg); } diff --git a/UI/data/themes/Dark.qss b/UI/data/themes/Dark.qss index ab46aabf1..6a3e5b141 100644 --- a/UI/data/themes/Dark.qss +++ b/UI/data/themes/Dark.qss @@ -289,6 +289,10 @@ QToolButton:pressed { qproperty-icon: url(./Dark/minus.svg); } +* [themeID="clearIconSmall"] { + qproperty-icon: url(./Dark/entry-clear.svg); +} + * [themeID="propertiesIconSmall"] { qproperty-icon: url(./Dark/settings/general.svg); } diff --git a/UI/data/themes/Dark/entry-clear.svg b/UI/data/themes/Dark/entry-clear.svg new file mode 100644 index 000000000..d30298481 --- /dev/null +++ b/UI/data/themes/Dark/entry-clear.svg @@ -0,0 +1,4 @@ + + + + diff --git a/UI/data/themes/Grey.qss b/UI/data/themes/Grey.qss index 8134dc8f5..a628faceb 100644 --- a/UI/data/themes/Grey.qss +++ b/UI/data/themes/Grey.qss @@ -452,6 +452,10 @@ QToolButton:pressed { qproperty-icon: url(./Dark/trash.svg); } +* [themeID="clearIconSmall"] { + qproperty-icon: url(./Dark/entry-clear.svg); +} + * [themeID="propertiesIconSmall"] { qproperty-icon: url(./Dark/settings/general.svg); } diff --git a/UI/data/themes/Light.qss b/UI/data/themes/Light.qss index bafe9b8d5..e8261a251 100644 --- a/UI/data/themes/Light.qss +++ b/UI/data/themes/Light.qss @@ -452,6 +452,10 @@ QToolButton:pressed { qproperty-icon: url(./Light/trash.svg); } +* [themeID="clearIconSmall"] { + qproperty-icon: url(./Light/entry-clear.svg); +} + * [themeID="propertiesIconSmall"] { qproperty-icon: url(./Light/settings/general.svg); } diff --git a/UI/data/themes/Light/entry-clear.svg b/UI/data/themes/Light/entry-clear.svg new file mode 100644 index 000000000..43c9deb6d --- /dev/null +++ b/UI/data/themes/Light/entry-clear.svg @@ -0,0 +1,4 @@ + + + + diff --git a/UI/data/themes/Rachni.qss b/UI/data/themes/Rachni.qss index d2792c234..9a73c0398 100644 --- a/UI/data/themes/Rachni.qss +++ b/UI/data/themes/Rachni.qss @@ -460,6 +460,10 @@ QToolButton:pressed { qproperty-icon: url(./Dark/trash.svg); } +* [themeID="clearIconSmall"] { + qproperty-icon: url(./Dark/entry-clear.svg); +} + * [themeID="propertiesIconSmall"] { qproperty-icon: url(./Dark/settings/general.svg); } diff --git a/UI/data/themes/System.qss b/UI/data/themes/System.qss index c7cae9980..f63dea2e4 100644 --- a/UI/data/themes/System.qss +++ b/UI/data/themes/System.qss @@ -22,6 +22,10 @@ OBSThemeMeta { qproperty-icon: url(:/res/images/minus.svg); } +* [themeID="clearIconSmall"] { + qproperty-icon: url(:/res/images/entry-clear.svg); +} + * [themeID="propertiesIconSmall"] { qproperty-icon: url(:/settings/images/settings/general.svg); } diff --git a/UI/data/themes/Yami.qss b/UI/data/themes/Yami.qss index 2d1f00f93..259e19ff1 100644 --- a/UI/data/themes/Yami.qss +++ b/UI/data/themes/Yami.qss @@ -456,6 +456,10 @@ QToolButton:pressed { qproperty-icon: url(./Dark/trash.svg); } +* [themeID="clearIconSmall"] { + qproperty-icon: url(./Dark/entry-clear.svg); +} + * [themeID="propertiesIconSmall"] { qproperty-icon: url(./Dark/settings/general.svg); } diff --git a/UI/forms/images/entry-clear.svg b/UI/forms/images/entry-clear.svg new file mode 100644 index 000000000..26843511b --- /dev/null +++ b/UI/forms/images/entry-clear.svg @@ -0,0 +1,4 @@ + + + + diff --git a/UI/forms/obs.qrc b/UI/forms/obs.qrc index 862120dc0..2424b956f 100644 --- a/UI/forms/obs.qrc +++ b/UI/forms/obs.qrc @@ -64,6 +64,7 @@ images/cogs.svg images/expand.svg images/collapse.svg + images/entry-clear.svg images/settings/output.svg diff --git a/UI/hotkey-edit.cpp b/UI/hotkey-edit.cpp index f541097d8..d046e71ec 100644 --- a/UI/hotkey-edit.cpp +++ b/UI/hotkey-edit.cpp @@ -283,7 +283,7 @@ void OBSHotkeyWidget::AddEdit(obs_key_combination combo, int idx) revert->setEnabled(false); auto clear = new QPushButton; - clear->setProperty("themeID", "trashIcon"); + clear->setProperty("themeID", "clearIconSmall"); clear->setToolTip(QTStr("Clear")); clear->setEnabled(!obs_key_combination_is_empty(combo));