From fdbdcb6efcbb3b9dc5c0a549646764f9cf8a9565 Mon Sep 17 00:00:00 2001 From: louis Date: Wed, 18 Sep 2013 11:44:04 +0200 Subject: made blending effect in displayChannel and displayReplay optional --- HISTORY | 3 +++ displaychannel.c | 6 +++--- displayreplay.c | 2 +- 3 files changed, 7 insertions(+), 4 deletions(-) diff --git a/HISTORY b/HISTORY index 8436085..f47225e 100644 --- a/HISTORY +++ b/HISTORY @@ -288,3 +288,6 @@ Version 0.1.4 main menu - optimized some theme colors in displaychannel and displaymessage - display of channel logo in main menu timer display configurable +- fixed a bug that progress bar is too long for too long schedules +- if background color and blending color in displayChannel and displayReplay + are the same, no blending effect is shown diff --git a/displaychannel.c b/displaychannel.c index 4c70546..f908300 100644 --- a/displaychannel.c +++ b/displaychannel.c @@ -192,7 +192,7 @@ void cNopacityDisplayChannel::CreateFonts(void) { } void cNopacityDisplayChannel::DrawBackground(void){ - if (config.doBlending) { + if (config.doBlending && (Theme.Color(clrChannelBackground) != Theme.Color(clrChannelBackBlend))) { DrawBlendedBackground(pixmapBackgroundTop, Theme.Color(clrChannelBackground), Theme.Color(clrChannelBackBlend), true); DrawBlendedBackground(pixmapBackgroundBottom, Theme.Color(clrChannelBackground), Theme.Color(clrChannelBackBlend), false); } else { @@ -204,7 +204,7 @@ void cNopacityDisplayChannel::DrawBackground(void){ if ((config.backgroundStyle == bsFull) && withInfo) { pixmapLogoBackground->Fill(Theme.Color(clrChannelBackground)); - if (config.doBlending) { + if (config.doBlending && (Theme.Color(clrChannelBackground) != Theme.Color(clrChannelBackBlend))) { DrawBlendedBackground(pixmapLogoBackgroundTop, Theme.Color(clrChannelBackground), Theme.Color(clrChannelBackBlend), true); DrawBlendedBackground(pixmapLogoBackgroundBottom, Theme.Color(clrChannelBackground), Theme.Color(clrChannelBackBlend), false); } else { @@ -777,7 +777,7 @@ void cNopacityDisplayChannel::DrawProgressBar(int Current, int Total) { if ((Current < currentLast + 3) && !channelChange) return; currentLast = Current; - if ((Current > 0) || (Total > 0)) { + if (((Current > 0) || (Total > 0)) && (Total >= Current)) { int barHeight = pixmapProgressBar->ViewPort().Height()-8; if (barHeight%2 != 0) barHeight++; diff --git a/displayreplay.c b/displayreplay.c index a855159..70bc930 100644 --- a/displayreplay.c +++ b/displayreplay.c @@ -128,7 +128,7 @@ void cNopacityDisplayReplay::CreateFonts(void) { void cNopacityDisplayReplay::DrawBackground(void) { if (!modeOnly) { - if (config.doBlending) { + if (config.doBlending && (Theme.Color(clrReplayBackground) != Theme.Color(clrReplayBackBlend))) { DrawBlendedBackground(pixmapHeader, Theme.Color(clrReplayBackground), Theme.Color(clrReplayBackBlend), true); DrawBlendedBackground(pixmapFooter, Theme.Color(clrReplayBackground), Theme.Color(clrReplayBackBlend), false); } else { -- cgit v1.2.3