diff options
author | kamel5 <vdr.kamel5 (at) gmx (dot) net> | 2022-06-04 15:04:35 +0200 |
---|---|---|
committer | kamel5 <vdr.kamel5 (at) gmx (dot) net> | 2022-06-09 13:46:58 +0200 |
commit | 1ea5cecda52336274ba20b7041553da10600909a (patch) | |
tree | 4a60d442ebd3b942cc446658a45a78201d454087 | |
parent | 1990be25d8adb1e0630307d46729db90154ac323 (diff) | |
download | skin-nopacity-1ea5cecda52336274ba20b7041553da10600909a.tar.gz skin-nopacity-1ea5cecda52336274ba20b7041553da10600909a.tar.bz2 |
Add a simple VolumeBox for DisplayReplay
Adds a simpler volume box in DisplayReplay. An setup option is added to
change the type of volume box.
-rw-r--r-- | config.c | 2 | ||||
-rw-r--r-- | displayreplay.c | 11 | ||||
-rw-r--r-- | geometrymanager.c | 14 | ||||
-rw-r--r-- | geometrymanager.h | 2 | ||||
-rw-r--r-- | po/ca_ES.po | 8 | ||||
-rw-r--r-- | po/de_DE.po | 8 | ||||
-rw-r--r-- | po/it_IT.po | 8 | ||||
-rw-r--r-- | po/sk_SK.po | 8 | ||||
-rw-r--r-- | setup.c | 8 | ||||
-rw-r--r-- | setup.h | 1 |
10 files changed, 60 insertions, 10 deletions
@@ -203,7 +203,7 @@ void cNopacityConfig::LoadDefaults(void) { conf.insert(std::pair<std::string, int>("replayBorderBottom", 15)); conf.insert(std::pair<std::string, int>("replayFadeTime", 300)); conf.insert(std::pair<std::string, int>("replayFadeOutTime", 300)); - conf.insert(std::pair<std::string, int>("displayReplayVolume", 1)); + conf.insert(std::pair<std::string, int>("displayReplayVolume", 2)); conf.insert(std::pair<std::string, int>("replayBorderVolumeBottom", 0)); conf.insert(std::pair<std::string, int>("fontReplayHeader", 0)); conf.insert(std::pair<std::string, int>("fontReplay", 0)); diff --git a/displayreplay.c b/displayreplay.c index 40e278f..2c1350f 100644 --- a/displayreplay.c +++ b/displayreplay.c @@ -476,9 +476,14 @@ void cNopacityDisplayReplay::DrawVolume(void) { int volume = statusMonitor->GetVolume(); if (volume != lastVolume) { if (!volumeBox) { - int left = (geoManager->replayWidth - geoManager->volumeWidth) / 2; - int top = geoManager->replayHeight - geoManager->volumeHeight - config.GetValue("replayBorderVolumeBottom"); - volumeBox = new cNopacityVolumeBox(osd, cRect(left, top, geoManager->volumeWidth, geoManager->volumeHeight), fontManager->volumeText); + bool simple = (config.GetValue("displayReplayVolume") == vbSimple) ? true : false; + volumeBox = new cNopacityVolumeBox(osd, + cRect(geoManager->replayVolumeLeft, + geoManager->replayVolumeTop, + geoManager->replayVolumeWidth, + geoManager->replayVolumeHeight), + simple ? fontManager->channelSourceInfo : fontManager->volumeText, + simple); } volumeBox->SetVolume(volume, MAXVOLUME, volume ? false : true); lastVolumeTime = time(NULL); diff --git a/geometrymanager.c b/geometrymanager.c index 91c8459..4ed5828 100644 --- a/geometrymanager.c +++ b/geometrymanager.c @@ -242,4 +242,18 @@ void cGeometryManager::SetGeometry(void) { volumeProgressBarHeight = 0.3 * volumeHeight; if (volumeProgressBarHeight % 2 != 0) volumeProgressBarHeight++; + + // Volume Sizes for Replay + if (config.GetValue("displayReplayVolume") == vbSimple) { + replayVolumeLeft = replayOsdWidth / 3; + replayVolumeTop = replayHeight - replayFooterHeight; + replayVolumeWidth = replayOsdWidth / 3; + replayVolumeHeight = replayFooterHeight; + } else { + replayVolumeLeft = (replayOsdWidth - volumeWidth) / 2; + replayVolumeTop = replayOsdHeight - volumeHeight - config.GetValue("replayBorderVolumeBottom"); + replayVolumeWidth = volumeWidth; + replayVolumeHeight = volumeHeight; + } + } diff --git a/geometrymanager.h b/geometrymanager.h index a8ce169..9b74f4b 100644 --- a/geometrymanager.h +++ b/geometrymanager.h @@ -101,6 +101,8 @@ class cGeometryManager { int replayJumpWidth, replayJumpHeight; int replayMessageY; int replayMessageWidth, replayMessageHeight; + int replayVolumeLeft, replayVolumeTop; + int replayVolumeWidth, replayVolumeHeight; //DisplayMessage Sizes int messageWidth; int messageHeight; diff --git a/po/ca_ES.po b/po/ca_ES.po index 2d588f9..5111f87 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: <see README>\n" -"POT-Creation-Date: 2022-06-01 17:59+0200\n" +"POT-Creation-Date: 2022-06-06 15:32+0200\n" "PO-Revision-Date: 2013-03-19 22:56+0100\n" "Last-Translator: Gabychan <gbonich@gmail.com>\n" "Language-Team: \n" @@ -659,6 +659,12 @@ msgstr "Ajusta mida de la Font - Grup de canals" msgid "Adjust Font Size - Next/Prev Channel Group" msgstr "Ajusta mida de la Font - Post/Ant Grup Canals" +msgid "simple" +msgstr "" + +msgid "full" +msgstr "" + msgid "Height of Replay Display (Percent of OSD Height)" msgstr "Alçada Visualització Reproducció (% alcada OSD)" diff --git a/po/de_DE.po b/po/de_DE.po index 1a3f053..7109f03 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: <see README>\n" -"POT-Creation-Date: 2022-06-01 17:59+0200\n" +"POT-Creation-Date: 2022-06-06 15:32+0200\n" "PO-Revision-Date: 2012-11-11 17:49+0200\n" "Last-Translator: louis\n" "Language-Team: \n" @@ -656,6 +656,12 @@ msgstr "Schriftgröße Anpassen - Kanalgruppen" msgid "Adjust Font Size - Next/Prev Channel Group" msgstr "Schriftgröße Anpassen - vorh./nächste Kanalgruppe" +msgid "simple" +msgstr "vereinfacht" + +msgid "full" +msgstr "vollständig" + msgid "Height of Replay Display (Percent of OSD Height)" msgstr "Höhe der Wiedergabe Anzeige (% der OSD Höhe)" diff --git a/po/it_IT.po b/po/it_IT.po index a41cf6c..b0a6c6f 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: <see README>\n" -"POT-Creation-Date: 2022-06-01 17:59+0200\n" +"POT-Creation-Date: 2022-06-06 15:32+0200\n" "PO-Revision-Date: 2013-03-19 22:56+0100\n" "Last-Translator: Diego Pierotto <vdr-italian@tiscali.it>\n" "Language-Team: \n" @@ -659,6 +659,12 @@ msgstr "" msgid "Adjust Font Size - Next/Prev Channel Group" msgstr "" +msgid "simple" +msgstr "" + +msgid "full" +msgstr "" + msgid "Height of Replay Display (Percent of OSD Height)" msgstr "Altezza di Mostra riproduzione (% altezza OSD)" diff --git a/po/sk_SK.po b/po/sk_SK.po index 517a523..abaf169 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: <see README>\n" -"POT-Creation-Date: 2022-06-01 17:59+0200\n" +"POT-Creation-Date: 2022-06-06 15:32+0200\n" "PO-Revision-Date: 2013-11-11 20:52+0100\n" "Last-Translator: Milan Hrala <hrala.milan@gmail.com>\n" "Language-Team: \n" @@ -656,6 +656,12 @@ msgstr "Nastavenie veµkosti písma - Skupina kanálu" msgid "Adjust Font Size - Next/Prev Channel Group" msgstr "Nastavenie veµkosti písma - Predchádzajúca/nasledujúca skupina kanálu" +msgid "simple" +msgstr "" + +msgid "full" +msgstr "" + msgid "Height of Replay Display (Percent of OSD Height)" msgstr "Vý¹ka zobrazenia prehrávania (Percento s OSD vý¹ky)" @@ -464,6 +464,9 @@ void cNopacitySetupChannelDisplay::Set(void) { //-----ReplayDisplay------------------------------------------------------------------------------------------------------------- cNopacitySetupReplayDisplay::cNopacitySetupReplayDisplay(cNopacityConfig* data) : cMenuSetupSubMenu(tr("Replay"), data) { + displayVolume[0] = tr("no"); + displayVolume[1] = tr("simple"); + displayVolume[2] = tr("full"); Set(); } @@ -476,9 +479,10 @@ void cNopacitySetupReplayDisplay::Set(void) { Add(new cMenuEditIntItem(tr("Height of Replay Display (Percent of OSD Height)"), tmpConf->GetValueRef("replayHeight"), 15, 80)); Add(new cMenuEditIntItem(tr("Left & Right Border Width"), tmpConf->GetValueRef("replayBorderVertical"), 0, 300)); Add(new cMenuEditIntItem(tr("Bottom Border Height"), tmpConf->GetValueRef("replayBorderBottom"), 0, 300)); - Add(new cMenuEditBoolItem(tr("Display Volume"), tmpConf->GetValueRef("displayReplayVolume"))); - if (tmpConf->GetValue("displayReplayVolume")) + Add(new cMenuEditStraItem(tr("Display Volume"), tmpConf->GetValueRef("displayReplayVolume"), 3, displayVolume)); + if (tmpConf->GetValue("displayReplayVolume") == vbFull) { Add(new cMenuEditIntItem(cString::sprintf("%s%s", *spacer, tr("Bottom Volume Border Height")), tmpConf->GetValueRef("replayBorderVolumeBottom"), 0, 1000)); + } Add(new cMenuEditIntItem(tr("Adjust Font Size - Header"), tmpConf->GetValueRef("fontReplayHeader"), -20, 20)); Add(new cMenuEditIntItem(tr("Adjust Font Size - Text"), tmpConf->GetValueRef("fontReplay"), -20, 20)); @@ -107,6 +107,7 @@ class cNopacitySetupChannelDisplay : public cMenuSetupSubMenu { class cNopacitySetupReplayDisplay : public cMenuSetupSubMenu { protected: + const char *displayVolume[3]; void Set(void); public: cNopacitySetupReplayDisplay(cNopacityConfig *data); |