Browse Source

UI: Use backspace icon to indicate "Clear" in hotkey-edit

gxalpha 3 years ago
parent
commit
a7419a9809

+ 4 - 0
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);
 }

+ 4 - 0
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);
 }

+ 4 - 0
UI/data/themes/Dark/entry-clear.svg

@@ -0,0 +1,4 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<svg height="16px" viewBox="0 0 16 16" width="16px" xmlns="http://www.w3.org/2000/svg">
+    <path d="m 6 2 l -6 6 l 6 6 h 9.035156 c 0.53125 -0.023438 0.964844 -0.492188 0.964844 -1 v -10 c 0 -0.53125 -0.34375 -1 -1.007812 -1 z m 1 3 h 1 h 0.03125 c 0.253906 0.011719 0.511719 0.128906 0.6875 0.3125 l 1.28125 1.28125 l 1.3125 -1.28125 c 0.265625 -0.230469 0.445312 -0.304688 0.6875 -0.3125 h 1 v 1 c 0 0.285156 -0.035156 0.550781 -0.25 0.75 l -1.28125 1.28125 l 1.25 1.25 c 0.1875 0.1875 0.28125 0.453125 0.28125 0.71875 v 1 h -1 c -0.265625 0 -0.53125 -0.09375 -0.71875 -0.28125 l -1.28125 -1.28125 l -1.28125 1.28125 c -0.1875 0.1875 -0.453125 0.28125 -0.71875 0.28125 h -1 v -1 c 0 -0.265625 0.09375 -0.53125 0.28125 -0.71875 l 1.28125 -1.25 l -1.28125 -1.28125 c -0.210938 -0.195312 -0.304688 -0.46875 -0.28125 -0.75 z m 0 0" fill="#fefefe"/>
+</svg>

+ 4 - 0
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);
 }

+ 4 - 0
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);
 }

+ 4 - 0
UI/data/themes/Light/entry-clear.svg

@@ -0,0 +1,4 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<svg height="16px" viewBox="0 0 16 16" width="16px" xmlns="http://www.w3.org/2000/svg">
+    <path d="m 6 2 l -6 6 l 6 6 h 9.035156 c 0.53125 -0.023438 0.964844 -0.492188 0.964844 -1 v -10 c 0 -0.53125 -0.34375 -1 -1.007812 -1 z m 1 3 h 1 h 0.03125 c 0.253906 0.011719 0.511719 0.128906 0.6875 0.3125 l 1.28125 1.28125 l 1.3125 -1.28125 c 0.265625 -0.230469 0.445312 -0.304688 0.6875 -0.3125 h 1 v 1 c 0 0.285156 -0.035156 0.550781 -0.25 0.75 l -1.28125 1.28125 l 1.25 1.25 c 0.1875 0.1875 0.28125 0.453125 0.28125 0.71875 v 1 h -1 c -0.265625 0 -0.53125 -0.09375 -0.71875 -0.28125 l -1.28125 -1.28125 l -1.28125 1.28125 c -0.1875 0.1875 -0.453125 0.28125 -0.71875 0.28125 h -1 v -1 c 0 -0.265625 0.09375 -0.53125 0.28125 -0.71875 l 1.28125 -1.25 l -1.28125 -1.28125 c -0.210938 -0.195312 -0.304688 -0.46875 -0.28125 -0.75 z m 0 0" fill="#202020"/>
+</svg>

+ 4 - 0
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);
 }

+ 4 - 0
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);
 }

+ 4 - 0
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);
 }

+ 4 - 0
UI/forms/images/entry-clear.svg

@@ -0,0 +1,4 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<svg height="16px" viewBox="0 0 16 16" width="16px" xmlns="http://www.w3.org/2000/svg">
+    <path d="m 6 2 l -6 6 l 6 6 h 9.035156 c 0.53125 -0.023438 0.964844 -0.492188 0.964844 -1 v -10 c 0 -0.53125 -0.34375 -1 -1.007812 -1 z m 1 3 h 1 h 0.03125 c 0.253906 0.011719 0.511719 0.128906 0.6875 0.3125 l 1.28125 1.28125 l 1.3125 -1.28125 c 0.265625 -0.230469 0.445312 -0.304688 0.6875 -0.3125 h 1 v 1 c 0 0.285156 -0.035156 0.550781 -0.25 0.75 l -1.28125 1.28125 l 1.25 1.25 c 0.1875 0.1875 0.28125 0.453125 0.28125 0.71875 v 1 h -1 c -0.265625 0 -0.53125 -0.09375 -0.71875 -0.28125 l -1.28125 -1.28125 l -1.28125 1.28125 c -0.1875 0.1875 -0.453125 0.28125 -0.71875 0.28125 h -1 v -1 c 0 -0.265625 0.09375 -0.53125 0.28125 -0.71875 l 1.28125 -1.25 l -1.28125 -1.28125 c -0.210938 -0.195312 -0.304688 -0.46875 -0.28125 -0.75 z m 0 0" fill="#000000"/>
+</svg>

+ 1 - 0
UI/forms/obs.qrc

@@ -64,6 +64,7 @@
     <file>images/cogs.svg</file>
     <file>images/expand.svg</file>
     <file>images/collapse.svg</file>
+    <file>images/entry-clear.svg</file>
   </qresource>
   <qresource prefix="/settings">
     <file>images/settings/output.svg</file>

+ 1 - 1
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));