[vlc-devel] [PATCH 07/15] Update QT Simple preferences
Roland Bewick
roland.bewick at gmail.com
Tue May 14 11:40:06 CEST 2019
Add alignment and margin options for dual subtitles
---
modules/gui/qt/components/simple_preferences.cpp | 3 +
modules/gui/qt/ui/sprefs_subtitles.ui | 91 ++++++++++++++++++++++++
2 files changed, 94 insertions(+)
diff --git a/modules/gui/qt/components/simple_preferences.cpp b/modules/gui/qt/components/simple_preferences.cpp
index 914b92f07d..7d41ae3f1c 100644
--- a/modules/gui/qt/components/simple_preferences.cpp
+++ b/modules/gui/qt/components/simple_preferences.cpp
@@ -870,6 +870,9 @@ SPrefsPanel::SPrefsPanel( intf_thread_t *_p_intf, QWidget *_parent,
optionWidgets["shadowCB"] = ui.shadowCheck;
optionWidgets["backgroundCB"] = ui.backgroundCheck;
+ CONFIG_GENERIC( "secondary-spu-alignment", IntegerList,
+ ui.secondarySubsAlignmentLabel, secondarySubsAlignment );
+ CONFIG_GENERIC_NO_BOOL( "secondary-sub-margin", Integer, ui.secondarySubsPosLabel, secondarySubsPosition );
END_SPREFS_CAT;
case SPrefsHotkeys:
diff --git a/modules/gui/qt/ui/sprefs_subtitles.ui b/modules/gui/qt/ui/sprefs_subtitles.ui
index b9e851dc9d..d630a60660 100644
--- a/modules/gui/qt/ui/sprefs_subtitles.ui
+++ b/modules/gui/qt/ui/sprefs_subtitles.ui
@@ -313,6 +313,97 @@
</layout>
</widget>
</item>
+ <item>
+ <widget class="QGroupBox" name="groupBox_5">
+ <property name="sizePolicy">
+ <sizepolicy hsizetype="Preferred" vsizetype="Preferred">
+ <horstretch>0</horstretch>
+ <verstretch>0</verstretch>
+ </sizepolicy>
+ </property>
+ <property name="title">
+ <string>Dual Subtitles</string>
+ </property>
+ <layout class="QVBoxLayout" name="verticalLayout">
+ <item>
+ <widget class="QWidget" name="secondarySpuZone" native="true">
+ <layout class="QGridLayout">
+ <item row="0" column="1">
+ <widget class="QComboBox" name="secondarySubsAlignment"/>
+ </item>
+ <item row="0" column="0">
+ <widget class="QLabel" name="secondarySubsAlignmentLabel">
+ <property name="sizePolicy">
+ <sizepolicy hsizetype="Maximum" vsizetype="Preferred">
+ <horstretch>0</horstretch>
+ <verstretch>0</verstretch>
+ </sizepolicy>
+ </property>
+ <property name="text">
+ <string>Align</string>
+ </property>
+ <property name="alignment">
+ <set>Qt::AlignRight|Qt::AlignTrailing|Qt::AlignVCenter</set>
+ </property>
+ <property name="buddy">
+ <cstring>secondarySubsAlignment</cstring>
+ </property>
+ </widget>
+ </item>
+ <item row="0" column="2">
+ <spacer name="horizontalSpacer">
+ <property name="orientation">
+ <enum>Qt::Horizontal</enum>
+ </property>
+ <property name="sizeType">
+ <enum>QSizePolicy::Preferred</enum>
+ </property>
+ <property name="sizeHint" stdset="0">
+ <size>
+ <width>50</width>
+ <height>20</height>
+ </size>
+ </property>
+ </spacer>
+ </item>
+ <item row="0" column="3">
+ <widget class="QLabel" name="secondarySubsPosLabel">
+ <property name="text">
+ <string>Offset</string>
+ </property>
+ <property name="buddy">
+ <cstring>secondarySubsPosition</cstring>
+ </property>
+ </widget>
+ </item>
+ <item row="0" column="4">
+ <widget class="QSpinBox" name="secondarySubsPosition">
+ <property name="maximumSize">
+ <size>
+ <width>16777215</width>
+ <height>16777215</height>
+ </size>
+ </property>
+ <property name="alignment">
+ <set>Qt::AlignRight|Qt::AlignTrailing|Qt::AlignVCenter</set>
+ </property>
+ <property name="suffix">
+ <string> px</string>
+ </property>
+ <property name="minimum">
+ <number>-1024</number>
+ </property>
+ <property name="maximum">
+ <number>1024</number>
+ </property>
+ </widget>
+ </item>
+ </layout>
+ </widget>
+ </item>
+ </layout>
+ </widget>
+ </item>
</layout>
</widget>
</item>
--
2.11.0
More information about the vlc-devel
mailing list