summaryrefslogtreecommitdiff
path: root/displayreplay.c
diff options
context:
space:
mode:
authorMartin Schirrmacher <vdr.skinflatplus@schirrmacher.eu>2013-11-13 20:53:56 +0100
committerMartin Schirrmacher <vdr.skinflatplus@schirrmacher.eu>2013-11-13 20:53:56 +0100
commitdf0ef5f977678ca3dc2564cfb50457c5dc0e7b9d (patch)
tree3dd1399bfa6342bb2a84201d0086cb5a1b49e134 /displayreplay.c
parent4a855302f65dbc377126da73346103c7dac23b85 (diff)
downloadskin-flatplus-df0ef5f977678ca3dc2564cfb50457c5dc0e7b9d.tar.gz
skin-flatplus-df0ef5f977678ca3dc2564cfb50457c5dc0e7b9d.tar.bz2
fix replay borders if no progressbar & jump
Diffstat (limited to 'displayreplay.c')
-rw-r--r--displayreplay.c26
1 files changed, 22 insertions, 4 deletions
diff --git a/displayreplay.c b/displayreplay.c
index 3fb15058..bbf912c7 100644
--- a/displayreplay.c
+++ b/displayreplay.c
@@ -5,6 +5,7 @@ cFlatDisplayReplay::cFlatDisplayReplay(bool ModeOnly) {
current = "";
total = "";
+ ProgressShown = false;
CreateFullOsd();
TopBarCreate();
MessageCreate();
@@ -18,15 +19,13 @@ cFlatDisplayReplay::cFlatDisplayReplay(bool ModeOnly) {
osdWidth - Config.decorBorderReplaySize*2, Config.decorProgressReplaySize, marginItem, 0,
Config.decorProgressReplayFg, Config.decorProgressReplayBarFg, Config.decorProgressReplayBg, Config.decorProgressReplayType);
- labelJump = osd->CreatePixmap(1, cRect(Config.decorBorderReplaySize, osdHeight - labelHeight - Config.decorProgressReplaySize - marginItem - fontHeight - Config.decorBorderReplaySize,
+ labelJump = osd->CreatePixmap(1, cRect(Config.decorBorderReplaySize,
+ osdHeight - labelHeight - Config.decorProgressReplaySize - marginItem*3 - fontHeight - Config.decorBorderReplaySize*2,
osdWidth - Config.decorBorderReplaySize*2, fontHeight));
labelPixmap->Fill(Theme.Color(clrReplayBg));
labelJump->Fill(clrTransparent);
- DecorBorderDraw(Config.decorBorderReplaySize, osdHeight - labelHeight - Config.decorProgressReplaySize - Config.decorBorderReplaySize - marginItem,
- osdWidth - Config.decorBorderReplaySize*2, labelHeight + Config.decorProgressReplaySize + marginItem,
- Config.decorBorderReplaySize, Config.decorBorderReplayType, Config.decorBorderReplayFg, Config.decorBorderReplayBg);
}
cFlatDisplayReplay::~cFlatDisplayReplay() {
@@ -102,9 +101,21 @@ void cFlatDisplayReplay::SetMode(bool Play, bool Forward, int Speed) {
iconsPixmap->DrawImage( cPoint(left + fontHeight*3 + marginItem*3, 0), imgLoader.GetImage() );
}
+
+ if( ProgressShown )
+ DecorBorderDraw(Config.decorBorderReplaySize, osdHeight - labelHeight - Config.decorProgressReplaySize - Config.decorBorderReplaySize - marginItem,
+ osdWidth - Config.decorBorderReplaySize*2, labelHeight + Config.decorProgressReplaySize + marginItem,
+ Config.decorBorderReplaySize, Config.decorBorderReplayType, Config.decorBorderReplayFg, Config.decorBorderReplayBg);
+ else
+ DecorBorderDraw(Config.decorBorderReplaySize, osdHeight - labelHeight - Config.decorBorderReplaySize,
+ osdWidth - Config.decorBorderReplaySize*2, labelHeight,
+ Config.decorBorderReplaySize, Config.decorBorderReplayType, Config.decorBorderReplayFg, Config.decorBorderReplayBg);
+
+
}
void cFlatDisplayReplay::SetProgress(int Current, int Total) {
+ ProgressShown = true;
ProgressBarDrawMarks(Current, Total, marks, Theme.Color(clrReplayMarkFg), Theme.Color(clrReplayMarkCurrentFg));
}
@@ -125,6 +136,8 @@ void cFlatDisplayReplay::UpdateInfo(void) {
}
void cFlatDisplayReplay::SetJump(const char *Jump) {
+ DecorBorderClearByFrom(BorderRecordJump);
+
if( !Jump )
{
labelJump->Fill(clrTransparent);
@@ -134,6 +147,11 @@ void cFlatDisplayReplay::SetJump(const char *Jump) {
left /= 2;
labelJump->DrawText(cPoint(left, 0), Jump, Theme.Color(clrReplayFont), Theme.Color(clrReplayBg), font, font->Width(Jump), fontHeight, taCenter);
+
+ DecorBorderDraw(left + Config.decorBorderReplaySize,
+ osdHeight - labelHeight - Config.decorProgressReplaySize - marginItem*3 - fontHeight - Config.decorBorderReplaySize*2,
+ font->Width(Jump), fontHeight,
+ Config.decorBorderReplaySize, Config.decorBorderReplayType, Config.decorBorderReplayFg, Config.decorBorderReplayBg, BorderRecordJump);
}
void cFlatDisplayReplay::SetMessage(eMessageType Type, const char *Text) {