encoding );
CONFIG_GENERIC( "sub-language", String, ui.subLangLabel,
preferredLanguage );
+
+ CONFIG_GENERIC( "freetype-rel-fontsize", IntegerList,
+ ui.fontSizeLabel, fontSize );
+
CONFIG_GENERIC_NO_BOOL( "freetype-font", Font, ui.fontLabel, font );
CONFIG_GENERIC_NO_BOOL( "freetype-color", Color, ui.fontColorLabel,
fontColor );
- CONFIG_GENERIC( "freetype-rel-fontsize", IntegerList,
- ui.fontSizeLabel, fontSize );
CONFIG_GENERIC( "freetype-outline-thickness", IntegerList,
ui.fontEffectLabel, effect );
+ CONFIG_GENERIC_NO_BOOL( "freetype-outline-color", Color, ui.outlineColorLabel,
+ outlineColor );
+
CONFIG_GENERIC_NO_BOOL( "sub-margin", Integer, ui.subsPosLabel, subsPosition );
+ ui.shadowCheck->setChecked( config_GetInt( p_intf, "freetype-shadow-opacity" ) > 0 );
+ ui.backgroundCheck->setChecked( config_GetInt( p_intf, "freetype-background-opacity" ) > 0 );
+ optionWidgets.append( ui.shadowCheck );
+ optionWidgets.append( ui.backgroundCheck );
+
END_SPREFS_CAT;
case SPrefsHotkeys:
config_PutPsz( p_intf, "audio-filter", qtu( qs_filter.join( ":" ) ) );
break;
}
+ case SPrefsSubtitles:
+ {
+ bool b_checked = qobject_cast<QCheckBox *>(optionWidgets[shadowCB])->isChecked();
+ if( b_checked && config_GetInt( p_intf, "freetype-shadow-opacity" ) == 0 ) {
+ config_PutInt( p_intf, "freetype-shadow-opacity", 128 );
+ }
+ else if (!b_checked ) {
+ config_PutInt( p_intf, "freetype-shadow-opacity", 0 );
+ }
+
+ b_checked = qobject_cast<QCheckBox *>(optionWidgets[backgroundCB])->isChecked();
+ if( b_checked && config_GetInt( p_intf, "freetype-background-opacity" ) == 0 ) {
+ config_PutInt( p_intf, "freetype-background-opacity", 128 );
+ }
+ else if (!b_checked ) {
+ config_PutInt( p_intf, "freetype-background-opacity", 0 );
+ }
+
+ }
}
}
<rect>
<x>0</x>
<y>0</y>
- <width>758</width>
- <height>446</height>
+ <width>778</width>
+ <height>614</height>
</rect>
</property>
<property name="windowTitle">
<string>Form</string>
</property>
- <layout class="QVBoxLayout">
- <property name="spacing">
- <number>10</number>
- </property>
+ <layout class="QVBoxLayout" name="verticalLayout">
<item>
<widget class="QGroupBox" name="groupBox_3">
<property name="title">
<property name="title">
<string>Subtitles effects</string>
</property>
- <layout class="QGridLayout" rowstretch="0,0,0,0,0" columnstretch="0,0">
- <item row="3" column="1">
- <widget class="QComboBox" name="effect">
- <property name="sizePolicy">
- <sizepolicy hsizetype="Expanding" vsizetype="Fixed">
- <horstretch>0</horstretch>
- <verstretch>0</verstretch>
- </sizepolicy>
- </property>
- </widget>
- </item>
- <item row="3" column="0">
- <widget class="QLabel" name="fontEffectLabel">
+ <layout class="QGridLayout" name="gridLayout_2">
+ <item row="0" column="0">
+ <widget class="QLabel" name="fontLabel">
<property name="minimumSize">
<size>
<width>250</width>
</size>
</property>
<property name="text">
- <string>Outline thickness</string>
+ <string>Font</string>
</property>
<property name="buddy">
- <cstring>effect</cstring>
+ <cstring>font</cstring>
</property>
</widget>
</item>
- <item row="2" column="1">
- <widget class="QPushButton" name="fontColor">
- </widget>
+ <item row="0" column="1" colspan="3">
+ <widget class="QFontComboBox" name="font"/>
</item>
- <item row="2" column="0">
- <widget class="QLabel" name="fontColorLabel">
+ <item row="1" column="0">
+ <widget class="QLabel" name="fontSizeLabel">
<property name="minimumSize">
<size>
<width>250</width>
</size>
</property>
<property name="text">
- <string>Font color</string>
+ <string>Font size</string>
</property>
<property name="buddy">
- <cstring>fontColor</cstring>
+ <cstring>fontSize</cstring>
</property>
</widget>
</item>
</property>
</widget>
</item>
- <item row="1" column="0">
- <widget class="QLabel" name="fontSizeLabel">
- <property name="minimumSize">
+ <item row="1" 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>250</width>
- <height>0</height>
+ <width>20</width>
+ <height>20</height>
</size>
</property>
+ </spacer>
+ </item>
+ <item row="1" column="3">
+ <widget class="QLabel" name="fontColorLabel">
<property name="text">
- <string>Font size</string>
+ <string>Font color</string>
</property>
<property name="buddy">
- <cstring>fontSize</cstring>
+ <cstring>fontColor</cstring>
</property>
</widget>
</item>
- <item row="0" column="0">
- <widget class="QLabel" name="fontLabel">
+ <item row="1" column="4">
+ <widget class="QPushButton" name="fontColor"/>
+ </item>
+ <item row="2" column="0">
+ <widget class="QLabel" name="fontEffectLabel">
<property name="minimumSize">
<size>
<width>250</width>
</size>
</property>
<property name="text">
- <string>Font</string>
+ <string>Outline thickness</string>
</property>
<property name="buddy">
- <cstring>font</cstring>
+ <cstring>effect</cstring>
+ </property>
+ </widget>
+ </item>
+ <item row="2" column="1">
+ <widget class="QComboBox" name="effect">
+ <property name="sizePolicy">
+ <sizepolicy hsizetype="Expanding" vsizetype="Fixed">
+ <horstretch>0</horstretch>
+ <verstretch>0</verstretch>
+ </sizepolicy>
+ </property>
+ </widget>
+ </item>
+ <item row="2" column="3">
+ <widget class="QLabel" name="outlineColorLabel">
+ <property name="text">
+ <string>Outline color</string>
+ </property>
+ <property name="buddy">
+ <cstring>outlineColor</cstring>
+ </property>
+ </widget>
+ </item>
+ <item row="2" column="4">
+ <widget class="QPushButton" name="outlineColor"/>
+ </item>
+ <item row="3" column="0">
+ <widget class="QCheckBox" name="shadowCheck">
+ <property name="text">
+ <string>Add a shadow</string>
+ </property>
+ </widget>
+ </item>
+ <item row="3" column="3">
+ <widget class="QCheckBox" name="backgroundCheck">
+ <property name="text">
+ <string>Add a background</string>
</property>
</widget>
</item>
</property>
</widget>
</item>
- <item row="0" column="1">
- <widget class="QFontComboBox" name="font"/>
- </item>
<item row="4" column="1">
<widget class="QSpinBox" name="subsPosition">
<property name="maximumSize">
<tabstop>fontSize</tabstop>
<tabstop>fontColor</tabstop>
<tabstop>effect</tabstop>
+ <tabstop>outlineColor</tabstop>
+ <tabstop>shadowCheck</tabstop>
+ <tabstop>backgroundCheck</tabstop>
<tabstop>subsPosition</tabstop>
</tabstops>
<resources/>