0
0
mirror of https://github.com/obsproject/obs-studio.git synced 2024-09-20 13:08:50 +02:00
obs-studio/UI/forms/source-toolbar/media-controls.ui
cg2121 b0fbf25e24 UI: Fix media controls shortcuts being global
The play, pause and restart shortcuts were being called as global
shortcuts, being triggered no matter what. This fixes this by calling
the shortcut actions only when the media controls widget has focus.
2023-03-18 15:51:05 -07:00

313 lines
8.1 KiB
XML

<?xml version="1.0" encoding="UTF-8"?>
<ui version="4.0">
<class>MediaControls</class>
<widget class="QWidget" name="MediaControls">
<property name="geometry">
<rect>
<x>0</x>
<y>0</y>
<width>888</width>
<height>22</height>
</rect>
</property>
<property name="sizePolicy">
<sizepolicy hsizetype="Preferred" vsizetype="Preferred">
<horstretch>0</horstretch>
<verstretch>0</verstretch>
</sizepolicy>
</property>
<property name="minimumSize">
<size>
<width>0</width>
<height>22</height>
</size>
</property>
<property name="windowTitle">
<string notr="true">Form</string>
</property>
<layout class="QHBoxLayout" name="horizontalLayout">
<property name="spacing">
<number>6</number>
</property>
<property name="leftMargin">
<number>0</number>
</property>
<property name="topMargin">
<number>0</number>
</property>
<property name="rightMargin">
<number>0</number>
</property>
<property name="bottomMargin">
<number>0</number>
</property>
<item>
<widget class="QPushButton" name="playPauseButton">
<property name="sizePolicy">
<sizepolicy hsizetype="Fixed" vsizetype="Fixed">
<horstretch>0</horstretch>
<verstretch>0</verstretch>
</sizepolicy>
</property>
<property name="minimumSize">
<size>
<width>22</width>
<height>22</height>
</size>
</property>
<property name="toolTip">
<string>ContextBar.MediaControls.RestartMedia</string>
</property>
<property name="text">
<string/>
</property>
<property name="icon">
<iconset resource="../obs.qrc">
<normaloff>:/res/images/media/media_restart.svg</normaloff>:/res/images/media/media_restart.svg</iconset>
</property>
<property name="iconSize">
<size>
<width>20</width>
<height>20</height>
</size>
</property>
<property name="flat">
<bool>true</bool>
</property>
<property name="themeID2" stdset="0">
<string notr="true">contextBarButton</string>
</property>
</widget>
</item>
<item>
<widget class="QPushButton" name="previousButton">
<property name="sizePolicy">
<sizepolicy hsizetype="Fixed" vsizetype="Fixed">
<horstretch>0</horstretch>
<verstretch>0</verstretch>
</sizepolicy>
</property>
<property name="minimumSize">
<size>
<width>22</width>
<height>22</height>
</size>
</property>
<property name="toolTip">
<string>ContextBar.MediaControls.PlaylistPrevious</string>
</property>
<property name="text">
<string/>
</property>
<property name="icon">
<iconset resource="../obs.qrc">
<normaloff>:/res/images/media/media_previous.svg</normaloff>:/res/images/media/media_previous.svg</iconset>
</property>
<property name="iconSize">
<size>
<width>20</width>
<height>20</height>
</size>
</property>
<property name="shortcut">
<string>P</string>
</property>
<property name="flat">
<bool>true</bool>
</property>
<property name="themeID2" stdset="0">
<string notr="true">contextBarButton</string>
</property>
</widget>
</item>
<item>
<widget class="QPushButton" name="stopButton">
<property name="sizePolicy">
<sizepolicy hsizetype="Fixed" vsizetype="Fixed">
<horstretch>0</horstretch>
<verstretch>0</verstretch>
</sizepolicy>
</property>
<property name="minimumSize">
<size>
<width>22</width>
<height>22</height>
</size>
</property>
<property name="toolTip">
<string>ContextBar.MediaControls.StopMedia</string>
</property>
<property name="text">
<string/>
</property>
<property name="icon">
<iconset resource="../obs.qrc">
<normaloff>:/res/images/media/media_stop.svg</normaloff>:/res/images/media/media_stop.svg</iconset>
</property>
<property name="iconSize">
<size>
<width>20</width>
<height>20</height>
</size>
</property>
<property name="shortcut">
<string>S</string>
</property>
<property name="flat">
<bool>true</bool>
</property>
<property name="themeID2" stdset="0">
<string notr="true">contextBarButton</string>
</property>
</widget>
</item>
<item>
<widget class="QPushButton" name="nextButton">
<property name="sizePolicy">
<sizepolicy hsizetype="Fixed" vsizetype="Fixed">
<horstretch>0</horstretch>
<verstretch>0</verstretch>
</sizepolicy>
</property>
<property name="minimumSize">
<size>
<width>22</width>
<height>22</height>
</size>
</property>
<property name="toolTip">
<string>ContextBar.MediaControls.PlaylistNext</string>
</property>
<property name="text">
<string/>
</property>
<property name="icon">
<iconset resource="../obs.qrc">
<normaloff>:/res/images/media/media_next.svg</normaloff>:/res/images/media/media_next.svg</iconset>
</property>
<property name="iconSize">
<size>
<width>20</width>
<height>20</height>
</size>
</property>
<property name="shortcut">
<string>N</string>
</property>
<property name="flat">
<bool>true</bool>
</property>
<property name="themeID2" stdset="0">
<string notr="true">contextBarButton</string>
</property>
</widget>
</item>
<item>
<widget class="MediaSlider" name="slider">
<property name="minimumSize">
<size>
<width>0</width>
<height>22</height>
</size>
</property>
<property name="accessibleName">
<string>ContextBar.MediaControls.BlindSeek</string>
</property>
<property name="maximum">
<number>1024</number>
</property>
<property name="tracking">
<bool>false</bool>
</property>
<property name="orientation">
<enum>Qt::Horizontal</enum>
</property>
</widget>
</item>
<item>
<widget class="QLabel" name="timerLabel">
<property name="sizePolicy">
<sizepolicy hsizetype="Preferred" vsizetype="Fixed">
<horstretch>0</horstretch>
<verstretch>0</verstretch>
</sizepolicy>
</property>
<property name="minimumSize">
<size>
<width>0</width>
<height>22</height>
</size>
</property>
<property name="text">
<string>--:--:--</string>
</property>
</widget>
</item>
<item>
<widget class="QLabel" name="label">
<property name="sizePolicy">
<sizepolicy hsizetype="Preferred" vsizetype="Fixed">
<horstretch>0</horstretch>
<verstretch>0</verstretch>
</sizepolicy>
</property>
<property name="minimumSize">
<size>
<width>0</width>
<height>22</height>
</size>
</property>
<property name="text">
<string>/</string>
</property>
</widget>
</item>
<item>
<widget class="ClickableLabel" name="durationLabel">
<property name="sizePolicy">
<sizepolicy hsizetype="Preferred" vsizetype="Fixed">
<horstretch>0</horstretch>
<verstretch>0</verstretch>
</sizepolicy>
</property>
<property name="minimumSize">
<size>
<width>0</width>
<height>22</height>
</size>
</property>
<property name="text">
<string>--:--:--</string>
</property>
</widget>
</item>
<item>
<widget class="QFrame" name="emptySpaceAgain">
<property name="sizePolicy">
<sizepolicy hsizetype="Expanding" vsizetype="Fixed">
<horstretch>0</horstretch>
<verstretch>0</verstretch>
</sizepolicy>
</property>
</widget>
</item>
</layout>
</widget>
<customwidgets>
<customwidget>
<class>MediaSlider</class>
<extends>QSlider</extends>
<header>media-slider.hpp</header>
</customwidget>
<customwidget>
<class>ClickableLabel</class>
<extends>QLabel</extends>
<header>clickable-label.hpp</header>
</customwidget>
</customwidgets>
<resources>
<include location="../obs.qrc"/>
</resources>
<connections/>
</ui>