From 3aff3c4caf738e13b20933d2eb54e5ee08e32b52 Mon Sep 17 00:00:00 2001 From: ims Date: Sun, 12 Jan 2025 12:35:17 +0100 Subject: [PATCH] DVB subtites - fixed background transparency --- lib/dvb/subtitle.cpp | 2 +- lib/python/Components/UsageConfig.py | 3 ++- 2 files changed, 3 insertions(+), 2 deletions(-) diff --git a/lib/dvb/subtitle.cpp b/lib/dvb/subtitle.cpp index 9a5044893a3..568669f3590 100644 --- a/lib/dvb/subtitle.cpp +++ b/lib/dvb/subtitle.cpp @@ -1087,7 +1087,7 @@ void eDVBSubtitleParser::subtitle_redraw(int page_id) palette[i].g = MAX(MIN(((298 * y - 55 * cb - 137 * cr) / 256), 255), 0); palette[i].b = MAX(MIN(((298 * y + 543 * cb) / 256), 255), 0); } - if (bcktrans) + if (bcktrans >= 0) { if (palette[i].r || palette[i].g || palette[i].b) palette[i].a = (entries[i].T) & 0xFF; diff --git a/lib/python/Components/UsageConfig.py b/lib/python/Components/UsageConfig.py index 5db8ce63c7f..7d13974a310 100644 --- a/lib/python/Components/UsageConfig.py +++ b/lib/python/Components/UsageConfig.py @@ -653,7 +653,8 @@ def quadpip_mode_notifier(configElement): config.subtitles.dvb_subtitles_original_position = ConfigSelection(default="0", choices=[("0", _("Original")), ("1", _("Fixed")), ("2", _("Relative"))]) config.subtitles.dvb_subtitles_centered = ConfigYesNo(default=False) config.subtitles.subtitle_bad_timing_delay = ConfigSelection(default="0", choices=subtitle_delay_choicelist) - config.subtitles.dvb_subtitles_backtrans = ConfigSelection(default="0", choices=[ + config.subtitles.dvb_subtitles_backtrans = ConfigSelection(default="-1", choices=[ + ("-1", _("Original")), ("0", _("No transparency")), ("25", "10%"), ("50", "20%"),