diff options
author | kamel5 <vdr.kamel5 (at) gmx (dot) net> | 2022-06-03 17:59:34 +0200 |
---|---|---|
committer | kamel5 <vdr.kamel5 (at) gmx (dot) net> | 2022-06-09 13:46:58 +0200 |
commit | 60303c4b9fe6fcddaecb29830d099703a7b1a4d1 (patch) | |
tree | 6ec53052c0b8c9c4ce31777b873fa3b797a15c8c /displaychannelview.c | |
parent | 1ea5cecda52336274ba20b7041553da10600909a (diff) | |
download | skin-nopacity-60303c4b9fe6fcddaecb29830d099703a7b1a4d1.tar.gz skin-nopacity-60303c4b9fe6fcddaecb29830d099703a7b1a4d1.tar.bz2 |
Add a simple VolumeBox for DisplayChannel
Adds a simpler volume box in DisplayChannel. An setup option is added to
change the type of volume box.
Diffstat (limited to 'displaychannelview.c')
-rw-r--r-- | displaychannelview.c | 17 |
1 files changed, 14 insertions, 3 deletions
diff --git a/displaychannelview.c b/displaychannelview.c index 52bda78..929faa4 100644 --- a/displaychannelview.c +++ b/displaychannelview.c @@ -714,6 +714,8 @@ std::string cNopacityDisplayChannelView::GetChannelSep(const cChannel *channel, } void cNopacityDisplayChannelView::DrawSourceInfo(void) { + if (volumeBox && (config.GetValue("displayChannelVolume") == vbSimple)) + return; const cChannel *channel = cDevice::ActualDevice()->GetCurrentlyTunedTransponder(); const cSource *source = (channel) ? Sources.Get(channel->Source()) : NULL; cString channelInfo = ""; @@ -772,9 +774,18 @@ void cNopacityDisplayChannelView::DrawVolume(void) { int volume = statusMonitor->GetVolume(); if (volume != lastVolume) { if (!volumeBox) { - int left = (geoManager->channelOsdWidth - geoManager->volumeWidth) / 2; - int top = geoManager->channelOsdHeight - geoManager->volumeHeight - config.GetValue("channelBorderVolumeBottom"); - volumeBox = new cNopacityVolumeBox(osd, cRect(left, top, geoManager->volumeWidth, geoManager->volumeHeight), fontManager->volumeText); + bool simple = false; + if (config.GetValue("displayChannelVolume") == vbSimple) { + ClearSourceInfo(); + simple = true; + } + volumeBox = new cNopacityVolumeBox(osd, + cRect(geoManager->channelVolumeLeft, + geoManager->channelVolumeTop, + geoManager->channelVolumeWidth, + geoManager->channelVolumeHeight), + simple ? fontManager->channelSourceInfo : fontManager->volumeText, + simple); } volumeBox->SetVolume(volume, MAXVOLUME, volume ? false : true); lastVolumeTime = time(NULL); |