Commit 6b723625 authored by Jean-Baptiste Kempf's avatar Jean-Baptiste Kempf

Qt: preferences, fix checkbox behaviours

Remove weird layout margins, and zones for correct deactivations of
groups of groupBoxes
parent 94b30f51
...@@ -215,6 +215,9 @@ SPrefsPanel::SPrefsPanel( intf_thread_t *_p_intf, QWidget *_parent, ...@@ -215,6 +215,9 @@ SPrefsPanel::SPrefsPanel( intf_thread_t *_p_intf, QWidget *_parent,
******************************/ ******************************/
START_SPREFS_CAT( Video , qtr("Video Settings") ); START_SPREFS_CAT( Video , qtr("Video Settings") );
CONFIG_BOOL( "video", enableVideo ); CONFIG_BOOL( "video", enableVideo );
ui.videoZone->setEnabled( ui.enableVideo->isChecked() );
CONNECT( ui.enableVideo, toggled( bool ),
ui.videoZone, setEnabled( bool ) );
CONFIG_BOOL( "fullscreen", fullscreen ); CONFIG_BOOL( "fullscreen", fullscreen );
CONFIG_BOOL( "overlay", overlay ); CONFIG_BOOL( "overlay", overlay );
...@@ -259,9 +262,9 @@ SPrefsPanel::SPrefsPanel( intf_thread_t *_p_intf, QWidget *_parent, ...@@ -259,9 +262,9 @@ SPrefsPanel::SPrefsPanel( intf_thread_t *_p_intf, QWidget *_parent,
START_SPREFS_CAT( Audio, qtr("Audio Settings") ); START_SPREFS_CAT( Audio, qtr("Audio Settings") );
CONFIG_BOOL( "audio", enableAudio ); CONFIG_BOOL( "audio", enableAudio );
ui.SPrefsAudio_zone->setEnabled( ui.enableAudio->isChecked() ); ui.audioZone->setEnabled( ui.enableAudio->isChecked() );
CONNECT( ui.enableAudio, toggled( bool ), CONNECT( ui.enableAudio, toggled( bool ),
ui.SPrefsAudio_zone, setEnabled( bool ) ); ui.audioZone, setEnabled( bool ) );
#define audioCommon( name ) \ #define audioCommon( name ) \
QWidget * name ## Control = new QWidget( ui.outputAudioBox ); \ QWidget * name ## Control = new QWidget( ui.outputAudioBox ); \
...@@ -649,6 +652,9 @@ SPrefsPanel::SPrefsPanel( intf_thread_t *_p_intf, QWidget *_parent, ...@@ -649,6 +652,9 @@ SPrefsPanel::SPrefsPanel( intf_thread_t *_p_intf, QWidget *_parent,
ui.OSDTitlePosLabel, OSDTitlePos ); ui.OSDTitlePosLabel, OSDTitlePos );
CONFIG_BOOL( "spu", spuActiveBox); CONFIG_BOOL( "spu", spuActiveBox);
ui.spuZone->setEnabled( ui.spuActiveBox->isChecked() );
CONNECT( ui.spuActiveBox, toggled( bool ),
ui.spuZone, setEnabled( bool ) );
CONFIG_GENERIC( "subsdec-encoding", StringList, ui.encodLabel, CONFIG_GENERIC( "subsdec-encoding", StringList, ui.encodLabel,
encoding ); encoding );
......
...@@ -7,8 +7,8 @@ ...@@ -7,8 +7,8 @@
<rect> <rect>
<x>0</x> <x>0</x>
<y>0</y> <y>0</y>
<width>703</width> <width>707</width>
<height>656</height> <height>536</height>
</rect> </rect>
</property> </property>
<property name="sizePolicy"> <property name="sizePolicy">
...@@ -32,8 +32,11 @@ ...@@ -32,8 +32,11 @@
</widget> </widget>
</item> </item>
<item> <item>
<widget class="QWidget" name="SPrefsAudio_zone" native="true"> <widget class="QWidget" name="audioZone" native="true">
<layout class="QVBoxLayout" name="verticalLayout"> <layout class="QVBoxLayout" name="audioZoneLayout">
<property name="margin">
<number>0</number>
</property>
<item> <item>
<widget class="QGroupBox" name="audioBox"> <widget class="QGroupBox" name="audioBox">
<property name="title"> <property name="title">
...@@ -166,9 +169,6 @@ ...@@ -166,9 +169,6 @@
<property name="text"> <property name="text">
<string>Output module:</string> <string>Output module:</string>
</property> </property>
<property name="buddy">
<cstring>outputModule</cstring>
</property>
</widget> </widget>
</item> </item>
<item row="0" column="1"> <item row="0" column="1">
...@@ -204,9 +204,6 @@ ...@@ -204,9 +204,6 @@
<property name="text"> <property name="text">
<string>Destination file:</string> <string>Destination file:</string>
</property> </property>
<property name="buddy">
<cstring>fileName</cstring>
</property>
</widget> </widget>
</item> </item>
<item> <item>
...@@ -264,9 +261,6 @@ ...@@ -264,9 +261,6 @@
<property name="text"> <property name="text">
<string>Visualization:</string> <string>Visualization:</string>
</property> </property>
<property name="buddy">
<cstring>visualisation</cstring>
</property>
</widget> </widget>
</item> </item>
<item row="8" column="2" colspan="2"> <item row="8" column="2" colspan="2">
...@@ -309,9 +303,6 @@ ...@@ -309,9 +303,6 @@
<property name="text"> <property name="text">
<string>Dolby Surround:</string> <string>Dolby Surround:</string>
</property> </property>
<property name="buddy">
<cstring>detectionDolby</cstring>
</property>
</widget> </widget>
</item> </item>
<item row="5" column="0"> <item row="5" column="0">
...@@ -328,9 +319,6 @@ ...@@ -328,9 +319,6 @@
<property name="alignment"> <property name="alignment">
<set>Qt::AlignLeading|Qt::AlignLeft|Qt::AlignVCenter</set> <set>Qt::AlignLeading|Qt::AlignLeft|Qt::AlignVCenter</set>
</property> </property>
<property name="buddy">
<cstring>replayCombo</cstring>
</property>
</widget> </widget>
</item> </item>
<item row="5" column="2" colspan="2"> <item row="5" column="2" colspan="2">
...@@ -447,9 +435,6 @@ ...@@ -447,9 +435,6 @@
<property name="text"> <property name="text">
<string>Preferred audio language:</string> <string>Preferred audio language:</string>
</property> </property>
<property name="buddy">
<cstring>preferredAudioLanguage</cstring>
</property>
</widget> </widget>
</item> </item>
<item row="0" column="1"> <item row="0" column="1">
...@@ -501,9 +486,6 @@ ...@@ -501,9 +486,6 @@
<property name="alignment"> <property name="alignment">
<set>Qt::AlignRight|Qt::AlignTrailing|Qt::AlignVCenter</set> <set>Qt::AlignRight|Qt::AlignTrailing|Qt::AlignVCenter</set>
</property> </property>
<property name="buddy">
<cstring>lastfm_pass_edit</cstring>
</property>
</widget> </widget>
</item> </item>
<item row="0" column="0"> <item row="0" column="0">
...@@ -520,9 +502,6 @@ ...@@ -520,9 +502,6 @@
<property name="alignment"> <property name="alignment">
<set>Qt::AlignRight|Qt::AlignTrailing|Qt::AlignVCenter</set> <set>Qt::AlignRight|Qt::AlignTrailing|Qt::AlignVCenter</set>
</property> </property>
<property name="buddy">
<cstring>lastfm_user_edit</cstring>
</property>
</widget> </widget>
</item> </item>
</layout> </layout>
......
This diff is collapsed.
This diff is collapsed.
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment