summaryrefslogtreecommitdiff
path: root/displaytracks.c
diff options
context:
space:
mode:
authorMartin Schirrmacher <vdr.skinflatplus@schirrmacher.eu>2015-02-06 17:23:07 +0100
committerMartin Schirrmacher <vdr.skinflatplus@schirrmacher.eu>2015-02-06 17:23:07 +0100
commitec4e5aac8ef082d591e40a43134096d83db296d1 (patch)
treec2ed65d131f4077c413a5de385f3105a5940bb33 /displaytracks.c
parent675d5b44db48e314f1224b4056ac5c3d2c236a9e (diff)
downloadskin-flatplus-ec4e5aac8ef082d591e40a43134096d83db296d1.tar.gz
skin-flatplus-ec4e5aac8ef082d591e40a43134096d83db296d1.tar.bz2
[fix] subtitles does not use title
Diffstat (limited to 'displaytracks.c')
-rw-r--r--displaytracks.c18
1 files changed, 9 insertions, 9 deletions
diff --git a/displaytracks.c b/displaytracks.c
index 655ef148..5db0bc31 100644
--- a/displaytracks.c
+++ b/displaytracks.c
@@ -14,17 +14,17 @@ cFlatDisplayTracks::cFlatDisplayTracks(const char *Title, int NumTracks, const c
ac3Width = img_ac3->Width();
if( img_stereo )
stereoWidth = img_stereo->Width();
-
+
int imgWidthMax = max(ac3Width, stereoWidth);
itemHeight = fontHeight + Config.MenuItemPadding + Config.decorBorderTrackSize*2;
currentIndex = -1;
- maxItemWidth = font->Width(Title) + marginItem*2;
+ maxItemWidth = font->Width(Title) + marginItem*4;
for (int i = 0; i < NumTracks; i++)
maxItemWidth = max(maxItemWidth, font->Width(Tracks[i]) + marginItem*2);
-
- int headerWidth = font->Width(tr("Audio Tracks")) + font->Width(" ") + imgWidthMax;
+
+ int headerWidth = font->Width(Title) + font->Width(" ") + imgWidthMax;
maxItemWidth = max(maxItemWidth, headerWidth);
-
+
itemsHeight = (NumTracks+1) * itemHeight;
int left = osdWidth - maxItemWidth;
left /= 2;
@@ -36,8 +36,8 @@ cFlatDisplayTracks::cFlatDisplayTracks(const char *Title, int NumTracks, const c
tracksLogoPixmap = osd->CreatePixmap(1, cRect(left, osdHeight - itemsHeight - marginItem, maxItemWidth, itemsHeight));
tracksLogoPixmap->Fill(clrTransparent);
- SetItem(tr("Audio Tracks"), -1, false);
-
+ SetItem(Title, -1, false);
+
for (int i = 0; i < NumTracks; i++)
SetItem(Tracks[i], i, false);
}
@@ -72,7 +72,7 @@ void cFlatDisplayTracks::SetItem(const char *Text, int Index, bool Current) {
int left = osdWidth - maxItemWidth;
left /= 2;
-
+
int top = osdHeight - itemsHeight - marginItem + y;
if( Current )
@@ -84,7 +84,7 @@ void cFlatDisplayTracks::SetItem(const char *Text, int Index, bool Current) {
else
DecorBorderDraw(left, top, maxItemWidth, fontHeight,
Config.decorBorderTrackSize, Config.decorBorderTrackType, Config.decorBorderTrackFg, Config.decorBorderTrackBg);
-
+
}
void cFlatDisplayTracks::SetTrack(int Index, const char * const *Tracks) {