Skip to content

Commit

Permalink
[subtitle] fix background for external sutitles
Browse files Browse the repository at this point in the history
  • Loading branch information
koivo committed Apr 29, 2024
1 parent 4e59c2a commit 9b73582
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 14 deletions.
4 changes: 2 additions & 2 deletions lib/gui/esubtitle.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -356,7 +356,7 @@ int eSubtitleWidget::event(int event, void *data, void *data2)
if (!element.m_text.empty())
{
eRect &area = element.m_area;
if (eConfigManager::getConfigBoolValue("config.subtitles.showbackground"))
if (bcktrans != 255)
{
ePtr<eTextPara> para = new eTextPara(area);
para->setFont(subtitleStyles[Subtitle_TTX].font);
Expand All @@ -380,7 +380,7 @@ int eSubtitleWidget::event(int event, void *data, void *data2)
bbox.setHeight(bboxHeight);
area.setTop(area.top() - borderwidth);
}
painter.setForegroundColor(gRGB(0,0,0,64));
painter.setForegroundColor(gRGB(0,0,0,bcktrans));
painter.fill(bbox);
borderwidth = 0;
}
Expand Down
12 changes: 0 additions & 12 deletions lib/python/Components/UsageConfig.py
Original file line number Diff line number Diff line change
Expand Up @@ -976,18 +976,6 @@ def setZapmode(el):
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=[
("0", _("No transparency")),
("25", _("10%")),
("50", _("20%")),
("75", _("30%")),
("100", _("40%")),
("125", _("50%")),
("150", _("60%")),
("175", _("70%")),
("200", _("80%")),
("225", _("90%")),
("255", _("Full transparency"))])
config.subtitles.pango_subtitle_colors = ConfigSelection(default="0", choices=[
("0", _("alternative")),
("1", _("white")),
Expand Down

0 comments on commit 9b73582

Please sign in to comment.