Ver Fonte

UI: Add filters button to scenes toolbar

Makes it easier to access scene filters.
cg2121 há 3 anos atrás
pai
commit
14bd880822

+ 1 - 0
UI/data/locale/en-US.ini

@@ -113,6 +113,7 @@ MoveSourceDown="Move Source(s) Down"
 SourceProperties="Open Source Properties"
 SourceProperties="Open Source Properties"
 SourceFilters="Open Source Filters"
 SourceFilters="Open Source Filters"
 MixerToolbarMenu="Audio Mixer Menu"
 MixerToolbarMenu="Audio Mixer Menu"
+SceneFilters="Open Scene Filters"
 
 
 # warning for plugin load failures
 # warning for plugin load failures
 PluginsFailedToLoad.Title="Plugin Load Error"
 PluginsFailedToLoad.Title="Plugin Load Error"

+ 4 - 0
UI/data/themes/Acri.qss

@@ -524,6 +524,10 @@ QToolButton:pressed {
     qproperty-icon: url(./Dark/media-pause.svg);
     qproperty-icon: url(./Dark/media-pause.svg);
 }
 }
 
 
+* [themeID="filtersIcon"] {
+    qproperty-icon: url(./Dark/filter.svg);
+}
+
 QToolBarExtension {
 QToolBarExtension {
     background: palette(button);
     background: palette(button);
     min-width: 12px;
     min-width: 12px;

+ 4 - 0
UI/data/themes/Dark.qss

@@ -328,6 +328,10 @@ QToolButton:pressed {
     qproperty-icon: url(./Dark/cogs.svg);
     qproperty-icon: url(./Dark/cogs.svg);
 }
 }
 
 
+* [themeID="filtersIcon"] {
+    qproperty-icon: url(./Dark/filter.svg);
+}
+
 /* Tab Widget */
 /* Tab Widget */
 
 
 QTabWidget::pane { /* The tab widget frame */
 QTabWidget::pane { /* The tab widget frame */

+ 4 - 0
UI/data/themes/Grey.qss

@@ -522,6 +522,10 @@ QToolButton:pressed {
     qproperty-icon: url(./Dark/media-pause.svg);
     qproperty-icon: url(./Dark/media-pause.svg);
 }
 }
 
 
+* [themeID="filtersIcon"] {
+    qproperty-icon: url(./Dark/filter.svg);
+}
+
 QToolBarExtension {
 QToolBarExtension {
     background: palette(button);
     background: palette(button);
     min-width: 12px;
     min-width: 12px;

+ 4 - 0
UI/data/themes/Light.qss

@@ -522,6 +522,10 @@ QToolButton:pressed {
     qproperty-icon: url(./Light/media-pause.svg);
     qproperty-icon: url(./Light/media-pause.svg);
 }
 }
 
 
+* [themeID="filtersIcon"] {
+    qproperty-icon: url(./Light/filter.svg);
+}
+
 QToolBarExtension {
 QToolBarExtension {
     background: palette(button);
     background: palette(button);
     min-width: 12px;
     min-width: 12px;

+ 4 - 0
UI/data/themes/Rachni.qss

@@ -530,6 +530,10 @@ QToolButton:pressed {
     qproperty-icon: url(./Dark/media-pause.svg);
     qproperty-icon: url(./Dark/media-pause.svg);
 }
 }
 
 
+* [themeID="filtersIcon"] {
+    qproperty-icon: url(./Dark/filter.svg);
+}
+
 QToolBarExtension {
 QToolBarExtension {
     background: palette(button);
     background: palette(button);
     min-width: 12px;
     min-width: 12px;

+ 4 - 0
UI/data/themes/System.qss

@@ -58,6 +58,10 @@ OBSThemeMeta {
     qproperty-icon: url(:/res/images/cogs.svg);
     qproperty-icon: url(:/res/images/cogs.svg);
 }
 }
 
 
+* [themeID="filtersIcon"] {
+    qproperty-icon: url(:/res/images/filter.svg);
+}
+
 MuteCheckBox {
 MuteCheckBox {
     outline: none;
     outline: none;
 }
 }

+ 4 - 0
UI/data/themes/Yami.qss

@@ -526,6 +526,10 @@ QToolButton:pressed {
     qproperty-icon: url(./Dark/media-pause.svg);
     qproperty-icon: url(./Dark/media-pause.svg);
 }
 }
 
 
+* [themeID="filtersIcon"] {
+    qproperty-icon: url(./Dark/filter.svg);
+}
+
 QToolBarExtension {
 QToolBarExtension {
     background: palette(button);
     background: palette(button);
     min-width: 12px;
     min-width: 12px;

+ 17 - 0
UI/forms/OBSBasic.ui

@@ -842,6 +842,8 @@
           <addaction name="actionAddScene"/>
           <addaction name="actionAddScene"/>
           <addaction name="actionRemoveScene"/>
           <addaction name="actionRemoveScene"/>
           <addaction name="separator"/>
           <addaction name="separator"/>
+          <addaction name="actionSceneFilters"/>
+          <addaction name="separator"/>
           <addaction name="actionSceneUp"/>
           <addaction name="actionSceneUp"/>
           <addaction name="actionSceneDown"/>
           <addaction name="actionSceneDown"/>
          </widget>
          </widget>
@@ -2349,6 +2351,21 @@
     <string>menuIconSmall</string>
     <string>menuIconSmall</string>
    </property>
    </property>
   </action>
   </action>
+  <action name="actionSceneFilters">
+   <property name="icon">
+    <iconset resource="obs.qrc">
+     <normaloff>:/res/images/filter.svg</normaloff>:/res/images/filter.svg</iconset>
+   </property>
+   <property name="text">
+    <string>SceneFilters</string>
+   </property>
+   <property name="toolTip">
+    <string>SceneFilters</string>
+   </property>
+   <property name="themeID" stdset="0">
+    <string>filtersIcon</string>
+   </property>
+  </action>
  </widget>
  </widget>
  <customwidgets>
  <customwidgets>
   <customwidget>
   <customwidget>

+ 8 - 0
UI/window-basic-main.cpp

@@ -10197,6 +10197,14 @@ void OBSBasic::on_sourceFiltersButton_clicked()
 	OpenFilters();
 	OpenFilters();
 }
 }
 
 
+void OBSBasic::on_actionSceneFilters_triggered()
+{
+	OBSSource sceneSource = GetCurrentSceneSource();
+
+	if (sceneSource)
+		OpenFilters(sceneSource);
+}
+
 void OBSBasic::on_sourceInteractButton_clicked()
 void OBSBasic::on_sourceInteractButton_clicked()
 {
 {
 	on_actionInteract_triggered();
 	on_actionInteract_triggered();

+ 1 - 0
UI/window-basic-main.hpp

@@ -1032,6 +1032,7 @@ private slots:
 	void on_actionCenterToScreen_triggered();
 	void on_actionCenterToScreen_triggered();
 	void on_actionVerticalCenter_triggered();
 	void on_actionVerticalCenter_triggered();
 	void on_actionHorizontalCenter_triggered();
 	void on_actionHorizontalCenter_triggered();
+	void on_actionSceneFilters_triggered();
 
 
 	void on_OBSBasic_customContextMenuRequested(const QPoint &pos);
 	void on_OBSBasic_customContextMenuRequested(const QPoint &pos);