summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorMark Kendall <mkendall@mythtv.org>2010-12-09 03:49:54 (GMT)
committer Mark Kendall <mkendall@mythtv.org>2010-12-09 03:49:54 (GMT)
commit9bfe562c05dc65beae74a8b5a38a28052a007f5a (patch)
tree4e3ada109bef3959227f43feaf3c46cf5dedadba
parent15b4278b339b9dca31700461c25bb66504067ec7 (diff)
Left justify CC-608 captions.
With thanks to Jim Stichnoth for the patch. Refs #9030
-rw-r--r--mythtv/libs/libmythtv/subtitlescreen.cpp7
1 files changed, 4 insertions, 3 deletions
diff --git a/mythtv/libs/libmythtv/subtitlescreen.cpp b/mythtv/libs/libmythtv/subtitlescreen.cpp
index bd56ff7..c09f965 100644
--- a/mythtv/libs/libmythtv/subtitlescreen.cpp
+++ b/mythtv/libs/libmythtv/subtitlescreen.cpp
@@ -600,7 +600,7 @@ void SubtitleScreen::DisplayCC608Subtitles(void)
if (cc && (cc->text != QString::null))
{
- int width = font.width(cc->text) + pad_width * 2;
+ int width = font.width(cc->text) + pad_width;
int x = teletextmode ? cc->y : (cc->x + 3);
int y = teletextmode ? cc->x : cc->y;
x = (int)(((float)x / (float)xscale) * (float)m_safeArea.width());
@@ -612,7 +612,8 @@ void SubtitleScreen::DisplayCC608Subtitles(void)
MythUIShape *shape = new MythUIShape(this,
QString("cc608bg%1%2%3").arg(cc->x).arg(cc->y).arg(width));
shape->SetFillBrush(bgfill);
- shape->SetArea(MythRect(rect));
+ QRect bgrect(x - pad_width, y, width + pad_width, height);
+ shape->SetArea(MythRect(bgrect));
}
gTextSubFont->SetColor(clr[max(min(0, cc->color), 7)]);
@@ -620,7 +621,7 @@ void SubtitleScreen::DisplayCC608Subtitles(void)
cc->text, *gTextSubFont, rect, rect, (MythUIType*)this,
QString("cc608txt%1%2%3").arg(cc->x).arg(cc->y).arg(width));
if (text)
- text->SetJustification(Qt::AlignCenter);
+ text->SetJustification(Qt::AlignLeft);
m_refreshArea = true;
VERBOSE(VB_VBI, QString("x %1 y %2 String: '%3'")
.arg(cc->x).arg(cc->y).arg(cc->text));