From af70b4e06b5229343a3a68935d84200d637d417b Mon Sep 17 00:00:00 2001 From: louis Date: Sat, 1 Feb 2014 13:04:22 +0100 Subject: Fixed bugs that configured OSD top and left values are not correctly used in DisplayChannel, DisplayTracks, DisplayVolume and DisplayMessages --- HISTORY | 4 ++++ displaymessage.c | 2 +- displaytracks.c | 36 ++++++++++++++++++------------------ displayvolume.c | 4 ++-- geometrymanager.c | 2 +- po/ca_ES.po | 8 ++++---- po/de_DE.po | 8 ++++---- po/it_IT.po | 8 ++++---- po/sk_SK.po | 8 ++++---- setup.c | 4 ++-- 10 files changed, 44 insertions(+), 40 deletions(-) diff --git a/HISTORY b/HISTORY index a0f8330..be099bd 100644 --- a/HISTORY +++ b/HISTORY @@ -397,3 +397,7 @@ Version 1.0.2 - Fixed a possible crash if recording directory is no longer available Version 1.0.3 + +- Fixed bugs that configured OSD top and left values are not correctly + used in DisplayChannel, DisplayTracks, DisplayVolume and + DisplayMessages (closes Tickets 1659 and 1696) diff --git a/displaymessage.c b/displaymessage.c index 8d85f8b..f2c9c65 100644 --- a/displaymessage.c +++ b/displaymessage.c @@ -8,7 +8,7 @@ cNopacityDisplayMessage::cNopacityDisplayMessage(cImageCache *imgCache) { FadeTime = config.GetValue("messageFadeTime"); FrameTime = FadeTime / 10; int top = geoManager->osdTop + geoManager->osdHeight - geoManager->messageHeight - config.GetValue("messageBorderBottom"); - int left = (geoManager->osdLeft + geoManager->osdWidth - geoManager->messageWidth) / 2; + int left = geoManager->osdLeft + (geoManager->osdWidth - geoManager->messageWidth) / 2; osd = CreateOsd(left, top, geoManager->messageWidth, geoManager->messageHeight); pixmap = osd->CreatePixmap(2, cRect(0, 0, geoManager->messageWidth, geoManager->messageHeight)); pixmapBackground = osd->CreatePixmap(1, cRect(0, 0, geoManager->messageWidth, geoManager->messageHeight)); diff --git a/displaytracks.c b/displaytracks.c index 5f2c6dd..7c2a1e1 100644 --- a/displaytracks.c +++ b/displaytracks.c @@ -40,40 +40,40 @@ void cNopacityDisplayTracks::SetGeometry(void) { int top, left; switch(config.GetValue("tracksPosition")) { case 0: //middle bottom - top = cOsd::OsdHeight() - cOsd::OsdTop() - height - config.GetValue("tracksBorderHorizontal"); - left = (cOsd::OsdWidth() - width) / 2; + top = geoManager->osdTop + geoManager->osdHeight - height - config.GetValue("tracksBorderVertical"); + left = geoManager->osdLeft + (geoManager->osdWidth - width) / 2; break; case 1: //left bottom - top = cOsd::OsdHeight() - cOsd::OsdTop() - height - config.GetValue("tracksBorderHorizontal"); - left = cOsd::OsdLeft(); + top = geoManager->osdTop + geoManager->osdHeight - height - config.GetValue("tracksBorderVertical"); + left = geoManager->osdLeft + config.GetValue("tracksBorderHorizontal"); break; case 2: //left middle - top = (cOsd::OsdHeight() - height) / 2; - left = cOsd::OsdLeft() + config.GetValue("tracksBorderVertical"); + top = geoManager->osdTop + (geoManager->osdHeight - height) / 2; + left = geoManager->osdLeft + config.GetValue("tracksBorderHorizontal"); break; case 3: //left top - top = cOsd::OsdTop() + config.GetValue("tracksBorderHorizontal"); - left = cOsd::OsdLeft() + config.GetValue("tracksBorderVertical"); + top = geoManager->osdTop + config.GetValue("tracksBorderVertical"); + left = geoManager->osdLeft + config.GetValue("tracksBorderHorizontal"); break; case 4: //top middle - top = cOsd::OsdTop() + config.GetValue("tracksBorderHorizontal"); - left = (cOsd::OsdWidth() - width) / 2; + top = geoManager->osdTop + config.GetValue("tracksBorderVertical"); + left = geoManager->osdLeft + (geoManager->osdWidth - width) / 2; break; case 5: //top right - top = cOsd::OsdTop() + config.GetValue("tracksBorderHorizontal"); - left = cOsd::OsdWidth() - cOsd::OsdLeft() - width - config.GetValue("tracksBorderVertical"); + top = geoManager->osdTop + config.GetValue("tracksBorderVertical"); + left = geoManager->osdLeft + geoManager->osdWidth - width - config.GetValue("tracksBorderHorizontal"); break; case 6: //right middle - top = (cOsd::OsdHeight() - height) / 2; - left = cOsd::OsdWidth() - cOsd::OsdLeft() - width - config.GetValue("tracksBorderVertical"); + top = geoManager->osdTop + (geoManager->osdHeight - height) / 2; + left = geoManager->osdLeft + geoManager->osdWidth - width - config.GetValue("tracksBorderHorizontal"); break; case 7: //right bottom - top = cOsd::OsdHeight() - cOsd::OsdTop() - height - config.GetValue("tracksBorderHorizontal"); - left = cOsd::OsdWidth() - cOsd::OsdLeft() - width - config.GetValue("tracksBorderVertical"); + top = geoManager->osdTop + geoManager->osdHeight - height - config.GetValue("tracksBorderVertical"); + left = geoManager->osdLeft + geoManager->osdWidth - width - config.GetValue("tracksBorderHorizontal"); break; default: //middle bottom - top = cOsd::OsdHeight() - cOsd::OsdTop() - height - config.GetValue("tracksBorderHorizontal"); - left = (cOsd::OsdWidth() - width) / 2; + top = geoManager->osdTop + geoManager->osdHeight - height - config.GetValue("tracksBorderVertical"); + left = geoManager->osdLeft + (geoManager->osdWidth - width) / 2; break; } osd = CreateOsd(left, top, width, height); diff --git a/displayvolume.c b/displayvolume.c index d6ba5d1..1661e02 100644 --- a/displayvolume.c +++ b/displayvolume.c @@ -11,8 +11,8 @@ cNopacityDisplayVolume::cNopacityDisplayVolume(cImageCache *imgCache) { FadeTime = config.GetValue("volumeFadeTime"); FrameTime = FadeTime / 10; - int top = (geoManager->osdHeight - geoManager->volumeHeight) - config.GetValue("volumeBorderBottom"); - int left = (geoManager->osdWidth - geoManager->volumeWidth) / 2; + int top = geoManager->osdTop + geoManager->osdHeight - geoManager->volumeHeight - config.GetValue("volumeBorderBottom"); + int left = geoManager->osdLeft + (geoManager->osdWidth - geoManager->volumeWidth) / 2; osd = CreateOsd(left, top, geoManager->volumeWidth, geoManager->volumeHeight); pixmapBackground = osd->CreatePixmap(1, cRect(0, 0, geoManager->volumeWidth, geoManager->volumeHeight)); diff --git a/geometrymanager.c b/geometrymanager.c index ff5c29d..5cc7a9f 100644 --- a/geometrymanager.c +++ b/geometrymanager.c @@ -113,7 +113,7 @@ void cGeometryManager::SetDisplayChannelSizes(void) { channelX = config.GetValue("channelBorderVertical"); channelWidth = osdWidth - 2 * config.GetValue("channelBorderVertical"); channelHeight = osdHeight * config.GetValue("channelHeight") / 100; - channelTop = osdTop + osdHeight - channelHeight - config.GetValue("channelBorderBottom"); + channelTop = osdHeight - channelHeight - config.GetValue("channelBorderBottom"); channelHeaderHeight = 0.2 * channelHeight; channelFooterHeight = 0.2 * channelHeight; diff --git a/po/ca_ES.po b/po/ca_ES.po index 3e8c288..cd190bc 100644 --- a/po/ca_ES.po +++ b/po/ca_ES.po @@ -8,7 +8,7 @@ msgid "" msgstr "" "Project-Id-Version: skinnopacity 0.0.1\n" "Report-Msgid-Bugs-To: \n" -"POT-Creation-Date: 2013-11-21 16:50+0100\n" +"POT-Creation-Date: 2014-02-01 12:43+0100\n" "PO-Revision-Date: 2013-03-19 22:56+0100\n" "Last-Translator: Gabychan \n" "Language-Team: \n" @@ -494,12 +494,12 @@ msgstr "Alçada Elements de Pistes (en píxels)" msgid "Position (0: bot. center, 1: bot. left, ... , 7: bot. right)" msgstr "Posició (0: bot. central, 1: bot. esq., ... , 7: bot. dret)" -msgid "Border Top / Bottom" -msgstr "Vora superior / inferior" - msgid "Border Left / Right" msgstr "Vora esquerra / dreta" +msgid "Border Top / Bottom" +msgstr "Vora superior / inferior" + msgid "Adjust Font Size - Buttons" msgstr "Ajusta mida de la Font - Botons" diff --git a/po/de_DE.po b/po/de_DE.po index a75b078..4ff72ee 100644 --- a/po/de_DE.po +++ b/po/de_DE.po @@ -8,7 +8,7 @@ msgid "" msgstr "" "Project-Id-Version: skinnopacity 0.0.1\n" "Report-Msgid-Bugs-To: \n" -"POT-Creation-Date: 2013-11-21 16:50+0100\n" +"POT-Creation-Date: 2014-02-01 12:43+0100\n" "PO-Revision-Date: 2012-11-11 17:49+0200\n" "Last-Translator: louis\n" "Language-Team: \n" @@ -491,12 +491,12 @@ msgstr "Höhe der Track Elemente (in Pixel)" msgid "Position (0: bot. center, 1: bot. left, ... , 7: bot. right)" msgstr "Position (0: unten mitte, 1: unten links, ... , 7: unten rechts)" -msgid "Border Top / Bottom" -msgstr "Rand oben und unten" - msgid "Border Left / Right" msgstr "Rand links und rechts" +msgid "Border Top / Bottom" +msgstr "Rand oben und unten" + msgid "Adjust Font Size - Buttons" msgstr "Schriftgröße anpassen - Buttons" diff --git a/po/it_IT.po b/po/it_IT.po index 876631c..89c23c8 100644 --- a/po/it_IT.po +++ b/po/it_IT.po @@ -8,7 +8,7 @@ msgid "" msgstr "" "Project-Id-Version: skinnopacity 0.0.1\n" "Report-Msgid-Bugs-To: \n" -"POT-Creation-Date: 2013-11-21 16:50+0100\n" +"POT-Creation-Date: 2014-02-01 12:43+0100\n" "PO-Revision-Date: 2013-03-19 22:56+0100\n" "Last-Translator: Diego Pierotto \n" "Language-Team: \n" @@ -494,12 +494,12 @@ msgstr "" msgid "Position (0: bot. center, 1: bot. left, ... , 7: bot. right)" msgstr "Posizione (0: basso centrale, 1: basso sin., ... , 7: basso destra)" -msgid "Border Top / Bottom" -msgstr "Bordo superiore / inferiore" - msgid "Border Left / Right" msgstr "Bordo sinistro / destro" +msgid "Border Top / Bottom" +msgstr "Bordo superiore / inferiore" + msgid "Adjust Font Size - Buttons" msgstr "Adatta dim. caratteri - Tasti" diff --git a/po/sk_SK.po b/po/sk_SK.po index 74f7270..38c0b0a 100644 --- a/po/sk_SK.po +++ b/po/sk_SK.po @@ -8,7 +8,7 @@ msgid "" msgstr "" "Project-Id-Version: vdr-skinnopacity\n" "Report-Msgid-Bugs-To: \n" -"POT-Creation-Date: 2013-11-21 16:50+0100\n" +"POT-Creation-Date: 2014-02-01 12:43+0100\n" "PO-Revision-Date: 2013-11-11 20:52+0100\n" "Last-Translator: Milan Hrala \n" "Language-Team: \n" @@ -491,12 +491,12 @@ msgstr "V msgid "Position (0: bot. center, 1: bot. left, ... , 7: bot. right)" msgstr "Pozícia (0: dole uprostred, 1: vµavo dole, ... , 7: vpravo dole)" -msgid "Border Top / Bottom" -msgstr "okraje navrchu / na spodku" - msgid "Border Left / Right" msgstr "Okraje vµavo / vpravo" +msgid "Border Top / Bottom" +msgstr "okraje navrchu / na spodku" + msgid "Adjust Font Size - Buttons" msgstr "Nastavenie veµkosti písma - Tlaèítka" diff --git a/setup.c b/setup.c index 9ea3dba..ac3f3d8 100644 --- a/setup.c +++ b/setup.c @@ -442,8 +442,8 @@ void cNopacitySetupTrackDisplay::Set(void) { Add(new cMenuEditIntItem(tr("Width of Tracks Display (Percent of OSD Width)"), tmpConf->GetValueRef("tracksWidth"), 10, 100)); Add(new cMenuEditIntItem(tr("Height of Track Items (in pixels)"), tmpConf->GetValueRef("tracksItemHeight"), 30, 200)); Add(new cMenuEditIntItem(tr("Position (0: bot. center, 1: bot. left, ... , 7: bot. right)"), tmpConf->GetValueRef("tracksPosition"), 0, 7)); - Add(new cMenuEditIntItem(tr("Border Top / Bottom"), tmpConf->GetValueRef("tracksBorderHorizontal"), 0, 100)); - Add(new cMenuEditIntItem(tr("Border Left / Right"), tmpConf->GetValueRef("tracksBorderVertical"), 0, 100)); + Add(new cMenuEditIntItem(tr("Border Left / Right"), tmpConf->GetValueRef("tracksBorderHorizontal"), 0, 100)); + Add(new cMenuEditIntItem(tr("Border Top / Bottom"), tmpConf->GetValueRef("tracksBorderVertical"), 0, 100)); Add(new cMenuEditIntItem(tr("Adjust Font Size - Header"), tmpConf->GetValueRef("fontTracksHeader"), -20, 20)); Add(new cMenuEditIntItem(tr("Adjust Font Size - Buttons"), tmpConf->GetValueRef("fontTracks"), -20, 20)); -- cgit v1.2.3