summaryrefslogtreecommitdiff
path: root/displaymenuview.c
diff options
context:
space:
mode:
authorkamel5 <vdr.kamel5 (at) gmx (dot) net>2022-06-06 17:02:44 +0200
committerkamel5 <vdr.kamel5 (at) gmx (dot) net>2022-06-09 13:51:19 +0200
commit8ffc7261eb95a9a31f6d68dbb005310aa465e6f4 (patch)
tree739ef1f9902f1bd6541a53b5b3e08d6a82db3572 /displaymenuview.c
parent60303c4b9fe6fcddaecb29830d099703a7b1a4d1 (diff)
downloadskin-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.
Diffstat (limited to 'displaymenuview.c')
-rw-r--r--displaymenuview.c12
1 files changed, 9 insertions, 3 deletions
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);