diff options
author | kamel5 <vdr.kamel5 (at) gmx (dot) net> | 2022-06-06 17:02:44 +0200 |
---|---|---|
committer | kamel5 <vdr.kamel5 (at) gmx (dot) net> | 2022-06-09 13:51:19 +0200 |
commit | 8ffc7261eb95a9a31f6d68dbb005310aa465e6f4 (patch) | |
tree | 739ef1f9902f1bd6541a53b5b3e08d6a82db3572 | |
parent | 60303c4b9fe6fcddaecb29830d099703a7b1a4d1 (diff) | |
download | skin-nopacity-8ffc7261eb95a9a31f6d68dbb005310aa465e6f4.tar.gz skin-nopacity-8ffc7261eb95a9a31f6d68dbb005310aa465e6f4.tar.bz2 |
Add a simple VolumeBox for DisplayMenu
Adds a simpler volume box in DisplayMenu. An setup option is added to
change the type of volume box.
-rw-r--r-- | config.c | 3 | ||||
-rw-r--r-- | displaymenuview.c | 12 | ||||
-rw-r--r-- | geometrymanager.c | 15 | ||||
-rw-r--r-- | geometrymanager.h | 2 | ||||
-rw-r--r-- | po/ca_ES.po | 14 | ||||
-rw-r--r-- | po/de_DE.po | 14 | ||||
-rw-r--r-- | po/it_IT.po | 14 | ||||
-rw-r--r-- | po/sk_SK.po | 14 | ||||
-rw-r--r-- | setup.c | 9 | ||||
-rw-r--r-- | setup.h | 1 |
10 files changed, 64 insertions, 34 deletions
@@ -129,8 +129,9 @@ void cNopacityConfig::LoadDefaults(void) { conf.insert(std::pair<std::string, int>("posterHeight", 750)); conf.insert(std::pair<std::string, int>("useFolderPoster", 1)); conf.insert(std::pair<std::string, int>("menuChannelLogoBackground", 1)); - conf.insert(std::pair<std::string, int>("displayMenuVolume", 1)); + conf.insert(std::pair<std::string, int>("displayMenuVolume", 2)); conf.insert(std::pair<std::string, int>("menuBorderVolumeBottom", 10)); + conf.insert(std::pair<std::string, int>("menuBorderVolumeBottomSimple", 50)); conf.insert(std::pair<std::string, int>("borderDetailedEPG", 30)); conf.insert(std::pair<std::string, int>("borderDetailedRecordings", 30)); conf.insert(std::pair<std::string, int>("headerDetailedEPG", 20)); diff --git a/displaymenuview.c b/displaymenuview.c index 0feea31..7179163 100644 --- a/displaymenuview.c +++ b/displaymenuview.c @@ -674,9 +674,15 @@ void cNopacityDisplayMenuView::DrawVolume(void) { int volume = statusMonitor->GetVolume(); if (volume != lastVolume) { if (!volumeBox) { - int left = (geoManager->osdWidth - geoManager->volumeWidth) / 2; - int top = geoManager->osdHeight - geoManager->volumeHeight - config.GetValue("menuBorderVolumeBottom"); - volumeBox = new cNopacityVolumeBox(osd, cRect(left, top, geoManager->volumeWidth, geoManager->volumeHeight), fontManager->volumeText); + bool simple = (config.GetValue("displayMenuVolume") == vbSimple) ? true : false; + volumeBox = new cNopacityVolumeBox(osd, + cRect(geoManager->menuVolumeLeft, + geoManager->menuVolumeTop, + geoManager->menuVolumeWidth, + geoManager->menuVolumeHeight), + fontManager->volumeText, + simple, + simple); } volumeBox->SetVolume(volume, MAXVOLUME, volume ? false : true); lastVolumeTime = time(NULL); diff --git a/geometrymanager.c b/geometrymanager.c index adfb8d9..0685a37 100644 --- a/geometrymanager.c +++ b/geometrymanager.c @@ -271,4 +271,19 @@ void cGeometryManager::SetGeometry(void) { replayVolumeHeight = volumeHeight; } + // Volume Sizes for Menu + if (config.GetValue("displayMenuVolume") == vbSimple) { + int vHeight = osdHeight * 5 / 100; + if (vHeight % 2 != 0) + vHeight++; + menuVolumeLeft = osdWidth / 3; + menuVolumeTop = osdHeight - vHeight - config.GetValue("menuBorderVolumeBottomSimple"); + menuVolumeWidth = osdWidth / 3; + menuVolumeHeight = vHeight; + } else { + menuVolumeLeft = (osdWidth - volumeWidth) / 2; + menuVolumeTop = osdHeight - volumeHeight - config.GetValue("menuBorderVolumeBottom"); + menuVolumeWidth = volumeWidth; + menuVolumeHeight = volumeHeight; + } } diff --git a/geometrymanager.h b/geometrymanager.h index b3a91e8..98de55f 100644 --- a/geometrymanager.h +++ b/geometrymanager.h @@ -56,6 +56,8 @@ class cGeometryManager { int menuDiskUsageWidth; int menuDiskUsageHeight; int menuTimersWidth; + int menuVolumeLeft, menuVolumeTop; + int menuVolumeWidth, menuVolumeHeight; //DisplayChannel Sizes int channelOsdLeft, channelOsdTop; int channelOsdWidth, channelOsdHeight; diff --git a/po/ca_ES.po b/po/ca_ES.po index 5111f87..8936e76 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-06 15:32+0200\n" +"POT-Creation-Date: 2022-06-06 17:02+0200\n" "PO-Revision-Date: 2013-03-19 22:56+0100\n" "Last-Translator: Gabychan <gbonich@gmail.com>\n" "Language-Team: \n" @@ -269,6 +269,12 @@ msgstr "rà pid" msgid "auto" msgstr "auto" +msgid "simple" +msgstr "" + +msgid "full" +msgstr "" + msgid "Number of Default Menu Entries per Page" msgstr "Nombre d'entrades de menú per pà gina" @@ -659,12 +665,6 @@ 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 7109f03..155ce08 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-06 15:32+0200\n" +"POT-Creation-Date: 2022-06-06 17:02+0200\n" "PO-Revision-Date: 2012-11-11 17:49+0200\n" "Last-Translator: louis\n" "Language-Team: \n" @@ -266,6 +266,12 @@ msgstr "schnell" msgid "auto" msgstr "auto" +msgid "simple" +msgstr "vereinfacht" + +msgid "full" +msgstr "vollständig" + msgid "Number of Default Menu Entries per Page" msgstr "Anzahl der Default-Menüelemente pro Seite" @@ -656,12 +662,6 @@ 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 b0a6c6f..1e836e6 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-06 15:32+0200\n" +"POT-Creation-Date: 2022-06-06 17:02+0200\n" "PO-Revision-Date: 2013-03-19 22:56+0100\n" "Last-Translator: Diego Pierotto <vdr-italian@tiscali.it>\n" "Language-Team: \n" @@ -269,6 +269,12 @@ msgstr "veloce" msgid "auto" msgstr "" +msgid "simple" +msgstr "" + +msgid "full" +msgstr "" + msgid "Number of Default Menu Entries per Page" msgstr "Numero di voci per pagina menu predefinito" @@ -659,12 +665,6 @@ 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 abaf169..d21b77a 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-06 15:32+0200\n" +"POT-Creation-Date: 2022-06-06 17:02+0200\n" "PO-Revision-Date: 2013-11-11 20:52+0100\n" "Last-Translator: Milan Hrala <hrala.milan@gmail.com>\n" "Language-Team: \n" @@ -266,6 +266,12 @@ msgstr "rýchlo" msgid "auto" msgstr "automaticky" +msgid "simple" +msgstr "" + +msgid "full" +msgstr "" + msgid "Number of Default Menu Entries per Page" msgstr "Poèet polo¾iek základného menu na stránke" @@ -656,12 +662,6 @@ 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)" @@ -152,6 +152,9 @@ cNopacitySetupMenuDisplay::cNopacitySetupMenuDisplay(cNopacityConfig* data) : c scalePic[0] = trVDR("no"); scalePic[1] = tr("yes"); scalePic[2] = tr("auto"); + displayVolume[0] = tr("no"); + displayVolume[1] = tr("simple"); + displayVolume[2] = tr("full"); Set(); } @@ -164,9 +167,11 @@ void cNopacitySetupMenuDisplay::Set(void) { Add(new cMenuEditStraItem(tr("Scale Video size to fit into menu window"), tmpConf->GetValueRef("scalePicture"), 3, scalePic)); Add(new cMenuEditIntItem(tr("Header Height (Percent of OSD Height)"), tmpConf->GetValueRef("headerHeight"), 5, 30)); Add(new cMenuEditIntItem(tr("Footer Height (Percent of OSD Height)"), tmpConf->GetValueRef("footerHeight"), 5, 30)); - Add(new cMenuEditBoolItem(tr("Display Volume"), tmpConf->GetValueRef("displayMenuVolume"))); - if (tmpConf->GetValue("displayMenuVolume")) + Add(new cMenuEditStraItem(tr("Display Volume"), tmpConf->GetValueRef("displayMenuVolume"), 3, displayVolume)); + if (tmpConf->GetValue("displayMenuVolume") == vbFull) Add(new cMenuEditIntItem(cString::sprintf("%s%s", *spacer, tr("Bottom Volume Border Height")), tmpConf->GetValueRef("menuBorderVolumeBottom"), 0, 1000)); + else if (tmpConf->GetValue("displayMenuVolume") == vbSimple) + Add(new cMenuEditIntItem(cString::sprintf("%s%s", *spacer, tr("Bottom Volume Border Height")), tmpConf->GetValueRef("menuBorderVolumeBottomSimple"), 0, 1000)); Add(new cMenuEditBoolItem(tr("Rounded Corners for menu items and buttons"), tmpConf->GetValueRef("roundedCorners"))); if (tmpConf->GetValue("roundedCorners")) Add(new cMenuEditIntItem(cString::sprintf("%s%s", *spacer, tr("Radius of rounded corners")), tmpConf->GetValueRef("cornerRadius"), 5, 30)); @@ -35,6 +35,7 @@ class cNopacitySetupMenuDisplay : public cMenuSetupSubMenu { const char *scrollMode[2]; const char *scrollSpeed[4]; const char *scalePic[3]; + const char *displayVolume[3]; void Set(void); public: cNopacitySetupMenuDisplay(cNopacityConfig *data); |