summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--config.c2
-rw-r--r--displaychannelview.c17
-rw-r--r--geometrymanager.c15
-rw-r--r--geometrymanager.h2
-rw-r--r--setup.c9
-rw-r--r--setup.h1
6 files changed, 39 insertions, 7 deletions
diff --git a/config.c b/config.c
index f82367a..9deffb2 100644
--- a/config.c
+++ b/config.c
@@ -195,7 +195,7 @@ void cNopacityConfig::LoadDefaults(void) {
conf.insert(std::pair<std::string, int>("progressCurrentSchedule", 0));
conf.insert(std::pair<std::string, int>("displayPoster", 1));
conf.insert(std::pair<std::string, int>("channelPosterBorder", 10));
- conf.insert(std::pair<std::string, int>("displayChannelVolume", 1));
+ conf.insert(std::pair<std::string, int>("displayChannelVolume", 2));
conf.insert(std::pair<std::string, int>("channelBorderVolumeBottom", 10));
//Display Replay
conf.insert(std::pair<std::string, int>("replayHeight", 25));
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);
diff --git a/geometrymanager.c b/geometrymanager.c
index 4ed5828..adfb8d9 100644
--- a/geometrymanager.c
+++ b/geometrymanager.c
@@ -243,6 +243,21 @@ void cGeometryManager::SetGeometry(void) {
if (volumeProgressBarHeight % 2 != 0)
volumeProgressBarHeight++;
+ // Volume Sizes for Channel
+ if (config.GetValue("displayChannelVolume") == vbSimple) {
+ channelVolumeLeft = channelX + channelContentX + channelWidth * 0.2 + 10;
+ channelVolumeTop = channelTop + channelHeaderHeight + channelProgressBarHeight + channelEpgInfoHeight;
+ channelVolumeWidth = channelX + channelWidth - channelStatusIconsWidth - 3 * channelStatusIconBorder - channelVolumeLeft - 25;
+ if (config.GetValue("logoPosition") == lpRight)
+ channelVolumeWidth -= channelLogoWidthTotal;
+ channelVolumeHeight = channelFooterHeight;
+ } else {
+ channelVolumeLeft = (channelOsdWidth - volumeWidth) / 2;
+ channelVolumeTop = channelOsdHeight - volumeHeight - config.GetValue("channelBorderVolumeBottom");
+ channelVolumeWidth = volumeWidth;
+ channelVolumeHeight = volumeHeight;
+ }
+
// Volume Sizes for Replay
if (config.GetValue("displayReplayVolume") == vbSimple) {
replayVolumeLeft = replayOsdWidth / 3;
diff --git a/geometrymanager.h b/geometrymanager.h
index 9b74f4b..b3a91e8 100644
--- a/geometrymanager.h
+++ b/geometrymanager.h
@@ -81,6 +81,8 @@ class cGeometryManager {
int channelStatusIconsWidth;
int channelStatusIconX;
int channelSourceInfoX;
+ int channelVolumeLeft, channelVolumeTop;
+ int channelVolumeWidth, channelVolumeHeight;
//DisplayReplay Sizes
int replayOsdLeft, replayOsdTop;
int replayOsdWidth, replayOsdHeight;
diff --git a/setup.c b/setup.c
index 75bc559..e6addaa 100644
--- a/setup.c
+++ b/setup.c
@@ -414,6 +414,9 @@ cNopacitySetupChannelDisplay::cNopacitySetupChannelDisplay(cNopacityConfig* data
useLogoBackground[3] = tr("if channel logo is not present");
progressStyleCurrentSchedule[0] = tr("show elapsed time");
progressStyleCurrentSchedule[1] = tr("show remaining time");
+ displayVolume[0] = tr("no");
+ displayVolume[1] = tr("simple");
+ displayVolume[2] = tr("full");
Set();
}
@@ -441,10 +444,10 @@ void cNopacitySetupChannelDisplay::Set(void) {
Add(new cMenuEditStraItem(tr("Kind of time display for current schedule"), tmpConf->GetValueRef("progressCurrentSchedule"), 2, progressStyleCurrentSchedule));
Add(new cMenuEditBoolItem(tr("Display Signal Strength & Quality"), tmpConf->GetValueRef("displaySignalStrength")));
Add(new cMenuEditBoolItem(tr("Display Channel Source & Rec. Info"), tmpConf->GetValueRef("displaySourceInfo")));
- Add(new cMenuEditBoolItem(tr("Display Volume"), tmpConf->GetValueRef("displayChannelVolume")));
- if (tmpConf->GetValue("displayChannelVolume"))
+ Add(new cMenuEditStraItem(tr("Display Volume"), tmpConf->GetValueRef("displayChannelVolume"), 3, displayVolume));
+ if (tmpConf->GetValue("displayChannelVolume") == vbFull) {
Add(new cMenuEditIntItem(cString::sprintf("%s%s", *spacer, tr("Bottom Volume Border Height")), tmpConf->GetValueRef("channelBorderVolumeBottom"), 0, 1000));
-
+ }
Add(new cMenuEditBoolItem(tr("Display Poster or Fanart from TVScraper"), tmpConf->GetValueRef("displayPoster")));
if (tmpConf->GetValue("displayPoster")) {
Add(new cMenuEditIntItem(cString::sprintf("%s%s", *spacer, tr("Border in Pixel")), tmpConf->GetValueRef("channelPosterBorder"), 0, 200));
diff --git a/setup.h b/setup.h
index d05c5f0..aa58f51 100644
--- a/setup.h
+++ b/setup.h
@@ -98,6 +98,7 @@ class cNopacitySetupChannelDisplay : public cMenuSetupSubMenu {
const char *logoPos[3];
const char *logoVerticalPos[3];
const char *useLogoBackground[4];
+ const char *displayVolume[3];
const char *progressStyleCurrentSchedule[2];
const char *bgStyle[2];
void Set(void);