Skip to content
Snippets Groups Projects
Commit 849b2896 authored by Nicolas Pomepuy's avatar Nicolas Pomepuy Committed by Duncan McNamara
Browse files

Fix subtitle default settings

parent e55aa439
No related branches found
No related tags found
1 merge request!1544Backport: !1521 Improve the subtitles settings
Pipeline #264566 passed with stage
in 4 minutes and 13 seconds
......@@ -98,8 +98,8 @@ object VLCOptions {
val freetypeShadowEnabled = pref.getBoolean("subtitles_shadow", true)
val freetypeShadowColor = Integer.decode(String.format("0x%06X", (0xFFFFFF and pref.getInt("subtitles_shadow_color", ContextCompat.getColor(context, R.color.grey_subtitle_shadow)))))
val freetypeShadowOpacity = pref.getInt("subtitles_shadow_color_opacity", 255)
val freetypeShadowColor = Integer.decode(String.format("0x%06X", (0xFFFFFF and pref.getInt("subtitles_shadow_color", ContextCompat.getColor(context, R.color.black)))))
val freetypeShadowOpacity = pref.getInt("subtitles_shadow_color_opacity", 128)
val opengl = Integer.parseInt(pref.getString("opengl", "-1")!!)
......
......@@ -49,7 +49,6 @@
<color name="grey875">#2a2a2a</color>
<color name="grey900">#212121</color>
<color name="grey_subtitle_shadow">#808080</color>
<color name="dark_background">#131313</color>
......
......@@ -179,15 +179,15 @@ class PreferencesSubtitles : BasePreferenceFragment(), SharedPreferences.OnShare
subtitlesOpacity.value = 255
subtitlesBackgroundEnabled.isChecked = false
subtitlesBackgroundColor.saveValue(Color.BLACK)
subtitlesBackgroundColor.saveValue(ContextCompat.getColor(activity, R.color.black))
subtitlesBackgroundOpacity.value = 255
subtitlesShadowEnabled.isChecked = true
subtitlesShadowColor.saveValue(ContextCompat.getColor(activity, R.color.grey_subtitle_shadow))
subtitlesShadowColor.saveValue(ContextCompat.getColor(activity, R.color.black))
subtitlesShadowOpacity.value = 255
subtitlesOutlineEnabled.isChecked = true
subtitlesOutlineColor.saveValue(Color.BLACK)
subtitlesOutlineColor.saveValue(ContextCompat.getColor(activity, R.color.black))
subtitlesOutlineOpacity.value = 255
}
......
......@@ -88,13 +88,13 @@
android:title="@string/subtitles_shadow_title"
app:singleLineTitle="false" />
<com.jaredrummler.android.colorpicker.ColorPreferenceCompat
android:defaultValue="@color/grey_subtitle_shadow"
android:defaultValue="@color/black"
android:key="subtitles_shadow_color"
app:isPreferenceVisible="false"
android:title="@string/subtitles_color" />
<SeekBarPreference
android:defaultValue="255"
android:defaultValue="128"
android:key="subtitles_shadow_color_opacity"
app:iconSpaceReserved="false"
app:isPreferenceVisible="false"
......
......@@ -138,15 +138,15 @@ class PreferencesSubtitles : BasePreferenceFragment(), SharedPreferences.OnShare
subtitlesOpacity.value = 255
subtitlesBackgroundEnabled.isChecked = false
subtitlesBackgroundColor.saveValue(Color.BLACK)
subtitlesBackgroundColor.saveValue(ContextCompat.getColor(requireActivity(), R.color.black))
subtitlesBackgroundOpacity.value = 255
subtitlesShadowEnabled.isChecked = true
subtitlesShadowColor.saveValue(ContextCompat.getColor(requireActivity(), R.color.grey_subtitle_shadow))
subtitlesShadowOpacity.value = 255
subtitlesShadowColor.saveValue(ContextCompat.getColor(requireActivity(), R.color.black))
subtitlesShadowOpacity.value = 128
subtitlesOutlineEnabled.isChecked = true
subtitlesOutlineColor.saveValue(Color.BLACK)
subtitlesOutlineColor.saveValue(ContextCompat.getColor(requireActivity(), R.color.black))
subtitlesOutlineOpacity.value = 255
}
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment