obs-studio/frontend/forms/OBSBasicControls.ui
gxalpha 76e1818866 frontend: Highlight control dock buttons using style class
Checkable buttons are troublesome because QAccessible interprets them as
checkboxes, and doesn't pass the "clicked" signal to them (see
QTBUG-110737). Instead, we only get the "toggled" signal, which also
gets triggered by things other than user input (i.e., the button getting
changed by the program).

Making them uncheckable means that they behave like normal buttons
again. To style them, we can just add a class and address them that way.
Note that uncheckable here means *actually* not checkable - unlike the
cursed NonCheckableButton class previously used that makes a button
that *is* checkable ignore the user input (and only allow check state
changes via code, effectively making it solely a styling tool).
2025-04-24 15:37:50 -04:00

357 lines
10 KiB
XML

<?xml version="1.0" encoding="UTF-8"?>
<ui version="4.0">
<class>OBSBasicControls</class>
<widget class="QWidget" name="OBSBasicControls">
<property name="geometry">
<rect>
<x>0</x>
<y>0</y>
<width>318</width>
<height>213</height>
</rect>
</property>
<layout class="QVBoxLayout" name="verticalLayout_9">
<property name="spacing">
<number>0</number>
</property>
<property name="leftMargin">
<number>1</number>
</property>
<property name="topMargin">
<number>0</number>
</property>
<property name="rightMargin">
<number>1</number>
</property>
<property name="bottomMargin">
<number>1</number>
</property>
<item>
<widget class="QFrame" name="controlsFrame">
<layout class="QVBoxLayout" name="buttonsVLayout">
<property name="spacing">
<number>0</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>
<layout class="QHBoxLayout" name="horizontalLayout_7">
<item>
<widget class="QPushButton" name="streamButton">
<property name="enabled">
<bool>true</bool>
</property>
<property name="sizePolicy">
<sizepolicy hsizetype="Ignored" vsizetype="Fixed">
<horstretch>0</horstretch>
<verstretch>0</verstretch>
</sizepolicy>
</property>
<property name="minimumSize">
<size>
<width>150</width>
<height>0</height>
</size>
</property>
<property name="text">
<string>Basic.Main.StartStreaming</string>
</property>
</widget>
</item>
<item>
<widget class="QPushButton" name="broadcastButton">
<property name="enabled">
<bool>true</bool>
</property>
<property name="sizePolicy">
<sizepolicy hsizetype="Ignored" vsizetype="Fixed">
<horstretch>0</horstretch>
<verstretch>0</verstretch>
</sizepolicy>
</property>
<property name="minimumSize">
<size>
<width>150</width>
<height>0</height>
</size>
</property>
<property name="text">
<string>Basic.Main.StartBroadcast</string>
</property>
</widget>
</item>
</layout>
</item>
<item>
<layout class="QHBoxLayout" name="recordingLayout">
<property name="spacing">
<number>2</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="recordButton">
<property name="enabled">
<bool>true</bool>
</property>
<property name="sizePolicy">
<sizepolicy hsizetype="MinimumExpanding" vsizetype="Fixed">
<horstretch>0</horstretch>
<verstretch>0</verstretch>
</sizepolicy>
</property>
<property name="minimumSize">
<size>
<width>0</width>
<height>0</height>
</size>
</property>
<property name="text">
<string>Basic.Main.StartRecording</string>
</property>
</widget>
</item>
<item>
<widget class="QPushButton" name="pauseRecordButton">
<property name="enabled">
<bool>true</bool>
</property>
<property name="minimumSize">
<size>
<width>0</width>
<height>0</height>
</size>
</property>
<property name="toolTip">
<string>Basic.Main.PauseRecording</string>
</property>
<property name="accessibleName">
<string>Basic.Main.PauseRecording</string>
</property>
<property name="icon">
<iconset resource="obs.qrc">
<normaloff>:/res/images/media-pause.svg</normaloff>:/res/images/media-pause.svg</iconset>
</property>
<property name="class" stdset="0">
<string>icon-media-pause</string>
</property>
</widget>
</item>
</layout>
</item>
<item>
<layout class="QHBoxLayout" name="replayBufferLayout">
<property name="spacing">
<number>2</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="replayBufferButton">
<property name="enabled">
<bool>true</bool>
</property>
<property name="sizePolicy">
<sizepolicy hsizetype="MinimumExpanding" vsizetype="Fixed">
<horstretch>0</horstretch>
<verstretch>0</verstretch>
</sizepolicy>
</property>
<property name="minimumSize">
<size>
<width>0</width>
<height>0</height>
</size>
</property>
<property name="text">
<string>Basic.Main.StartReplayBuffer</string>
</property>
</widget>
</item>
<item>
<widget class="QPushButton" name="saveReplayButton">
<property name="enabled">
<bool>true</bool>
</property>
<property name="minimumSize">
<size>
<width>0</width>
<height>0</height>
</size>
</property>
<property name="toolTip">
<string>Basic.Main.SaveReplay</string>
</property>
<property name="accessibleName">
<string>Basic.Main.SaveReplay</string>
</property>
<property name="icon">
<iconset resource="obs.qrc">
<normaloff>:/res/images/save.svg</normaloff>:/res/images/save.svg</iconset>
</property>
<property name="class" stdset="0">
<string>icon-save</string>
</property>
</widget>
</item>
</layout>
</item>
<item>
<layout class="QHBoxLayout" name="virtualCamLayout">
<property name="spacing">
<number>2</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="virtualCamButton">
<property name="enabled">
<bool>true</bool>
</property>
<property name="sizePolicy">
<sizepolicy hsizetype="MinimumExpanding" vsizetype="Fixed">
<horstretch>0</horstretch>
<verstretch>0</verstretch>
</sizepolicy>
</property>
<property name="minimumSize">
<size>
<width>0</width>
<height>0</height>
</size>
</property>
<property name="text">
<string>Basic.Main.StartVirtualCam</string>
</property>
</widget>
</item>
<item>
<widget class="QPushButton" name="virtualCamConfigButton">
<property name="enabled">
<bool>true</bool>
</property>
<property name="minimumSize">
<size>
<width>0</width>
<height>0</height>
</size>
</property>
<property name="toolTip">
<string>Basic.Main.VirtualCamConfig</string>
</property>
<property name="accessibleName">
<string>Basic.Main.VirtualCamConfig</string>
</property>
<property name="icon">
<iconset resource="obs.qrc">
<normaloff>:/settings/images/settings/general.svg</normaloff>:/settings/images/settings/general.svg</iconset>
</property>
<property name="class" stdset="0">
<string>icon-gear</string>
</property>
</widget>
</item>
</layout>
</item>
<item>
<widget class="QPushButton" name="modeSwitch">
<property name="sizePolicy">
<sizepolicy hsizetype="Ignored" vsizetype="Fixed">
<horstretch>0</horstretch>
<verstretch>0</verstretch>
</sizepolicy>
</property>
<property name="minimumSize">
<size>
<width>150</width>
<height>0</height>
</size>
</property>
<property name="text">
<string>Basic.TogglePreviewProgramMode</string>
</property>
</widget>
</item>
<item>
<widget class="QPushButton" name="settingsButton">
<property name="sizePolicy">
<sizepolicy hsizetype="Ignored" vsizetype="Fixed">
<horstretch>0</horstretch>
<verstretch>0</verstretch>
</sizepolicy>
</property>
<property name="minimumSize">
<size>
<width>150</width>
<height>0</height>
</size>
</property>
<property name="text">
<string>Settings</string>
</property>
</widget>
</item>
<item>
<spacer name="expVSpacer">
<property name="orientation">
<enum>Qt::Vertical</enum>
</property>
<property name="sizeHint" stdset="0">
<size>
<width>0</width>
<height>0</height>
</size>
</property>
</spacer>
</item>
</layout>
</widget>
</item>
</layout>
</widget>
<resources>
<include location="obs.qrc"/>
</resources>
<connections/>
</ui>