diff options
-rw-r--r-- | HISTORY | 4 | ||||
-rw-r--r-- | displaychannel.c | 7 | ||||
-rw-r--r-- | displaychannel.h | 3 | ||||
-rw-r--r-- | displaymenu.h | 10 | ||||
-rw-r--r-- | displayreplay.c | 13 | ||||
-rw-r--r-- | displayreplay.h | 1 | ||||
-rw-r--r-- | displayvolume.c | 14 | ||||
-rw-r--r-- | displayvolume.h | 3 |
8 files changed, 42 insertions, 13 deletions
@@ -1,7 +1,9 @@ VDR Plugin 'skinflat' Revision History --------------------------------------- +2013-XX-XX: Version 0.0.3 +- [fix] replay jump display -2013-30-08: Version 0.0.2 +2013-30-07: Version 0.0.2 - [add] replay marks - [change] colors - [change] progressbar diff --git a/displaychannel.c b/displaychannel.c index a9ef0c5..561510b 100644 --- a/displaychannel.c +++ b/displaychannel.c @@ -17,7 +17,8 @@ cFlatDisplayChannel::cFlatDisplayChannel(bool WithInfo) { int height = heightBottom; chanInfoBottomPixmap = osd->CreatePixmap(1, cRect(0, osdHeight - height, osdWidth, heightBottom)); - + chanLogoPixmap = osd->CreatePixmap(2, cRect(0, osdHeight - height, heightBottom, heightBottom)); + height += ProgressBarHeight(); ProgressBarCreate(0, osdHeight - height, osdWidth, Theme.Color(clrChannelProgressFg), Theme.Color(clrChannelProgressBarFg), Theme.Color(clrChannelProgressBg)); @@ -30,6 +31,7 @@ cFlatDisplayChannel::~cFlatDisplayChannel() { if (osd) { osd->DestroyPixmap(chanInfoTopPixmap); osd->DestroyPixmap(chanInfoBottomPixmap); + osd->DestroyPixmap(chanLogoPixmap); } } @@ -56,13 +58,14 @@ void cFlatDisplayChannel::SetEvents(const cEvent *Present, const cEvent *Followi cString epg(""); chanInfoBottomPixmap->Fill(Theme.Color(clrChannelBg)); + chanLogoPixmap->Fill(clrTransparent); int imageHeight = heightBottom - marginItem*2; if( imgLoader.LoadLogo(*channelName, imageHeight, imageHeight) ) { int imageLeft = marginItem; int imageTop = (heightBottom - imgLoader.Height() ) / 2; - chanInfoBottomPixmap->DrawImage( cPoint(imageLeft, imageTop), imgLoader.GetImage() ); + chanLogoPixmap->DrawImage( cPoint(imageLeft, imageTop), imgLoader.GetImage() ); } int left = heightBottom + marginItem; diff --git a/displaychannel.h b/displaychannel.h index 28b9c9e..e7b1d45 100644 --- a/displaychannel.h +++ b/displaychannel.h @@ -10,7 +10,8 @@ class cFlatDisplayChannel : public cFlatBaseRender, public cSkinDisplayChannel { cPixmap *chanInfoTopPixmap; cPixmap *chanInfoBottomPixmap; - + cPixmap *chanLogoPixmap; + int heightBottom; public: cFlatDisplayChannel(bool WithInfo); diff --git a/displaymenu.h b/displaymenu.h index fa97d8f..37662ea 100644 --- a/displaymenu.h +++ b/displaymenu.h @@ -23,10 +23,20 @@ class cFlatDisplayMenu : public cFlatBaseRender, public cSkinDisplayMenu { virtual void Scroll(bool Up, bool Page); virtual int MaxItems(void); virtual void Clear(void); + + //virtual void SetMenuCategory(eMenuCategory MenuCategory); + //virtual void SetTabs(int Tab1, int Tab2 = 0, int Tab3 = 0, int Tab4 = 0, int Tab5 = 0); + virtual void SetTitle(const char *Title); virtual void SetButtons(const char *Red, const char *Green = NULL, const char *Yellow = NULL, const char *Blue = NULL); virtual void SetMessage(eMessageType Type, const char *Text); virtual void SetItem(const char *Text, int Index, bool Current, bool Selectable); + + //virtual bool SetItemEvent(const cEvent *Event, int Index, bool Current, bool Selectable, const cChannel *Channel, bool WithDate, eTimerMatch TimerMatch); + //virtual bool SetItemTimer(const cTimer *Timer, int Index, bool Current, bool Selectable); + //virtual bool SetItemChannel(const cChannel *Channel, int Index, bool Current, bool Selectable, bool WithProvider); + //virtual bool SetItemRecording(const cRecording *Recording, int Index, bool Current, bool Selectable, int Level, int Total, int New); + virtual void SetScrollbar(int Total, int Offset); virtual void SetEvent(const cEvent *Event); virtual void SetRecording(const cRecording *Recording); diff --git a/displayreplay.c b/displayreplay.c index 976ac69..9343f3b 100644 --- a/displayreplay.c +++ b/displayreplay.c @@ -10,6 +10,7 @@ cFlatDisplayReplay::cFlatDisplayReplay(bool ModeOnly) { MessageCreate(); labelPixmap = osd->CreatePixmap(1, cRect(0, osdHeight - labelHeight, osdWidth, labelHeight)); + iconsPixmap = osd->CreatePixmap(2, cRect(0, osdHeight - labelHeight, osdWidth, labelHeight)); ProgressBarCreate(0, osdHeight - labelHeight - ProgressBarHeight() - marginItem, osdWidth, Theme.Color(clrReplayProgressFg), Theme.Color(clrReplayProgressBarFg), Theme.Color(clrReplayProgressBg)); @@ -23,6 +24,7 @@ cFlatDisplayReplay::cFlatDisplayReplay(bool ModeOnly) { cFlatDisplayReplay::~cFlatDisplayReplay() { osd->DestroyPixmap(labelPixmap); osd->DestroyPixmap(labelJump); + osd->DestroyPixmap(iconsPixmap); } void cFlatDisplayReplay::SetRecording(const cRecording *Recording) { @@ -46,8 +48,9 @@ void cFlatDisplayReplay::SetMode(bool Play, bool Forward, int Speed) { int left = osdWidth - (labelHeight * 4 + marginItem * 3); left /= 2; + iconsPixmap->Fill(clrTransparent); + labelPixmap->DrawRectangle(cRect( left - font->Width("33") - marginItem, 0, labelHeight*4 + marginItem*6 + font->Width("33")*2, labelHeight), Theme.Color(clrReplayBg) ); - labelPixmap->DrawRectangle(cRect( left - marginItem, 0, labelHeight*4 + marginItem*4, labelHeight), clrTransparent ); cString rewind, pause, play, forward; cString speed; @@ -82,13 +85,13 @@ void cFlatDisplayReplay::SetMode(bool Play, bool Forward, int Speed) { } if( imgLoader.LoadIcon(*rewind, labelHeight, labelHeight) ) - labelPixmap->DrawImage( cPoint(left, 0), imgLoader.GetImage() ); + iconsPixmap->DrawImage( cPoint(left, 0), imgLoader.GetImage() ); if( imgLoader.LoadIcon(*pause, labelHeight, labelHeight) ) - labelPixmap->DrawImage( cPoint(left + labelHeight + marginItem, 0), imgLoader.GetImage() ); + iconsPixmap->DrawImage( cPoint(left + labelHeight + marginItem, 0), imgLoader.GetImage() ); if( imgLoader.LoadIcon(*play, labelHeight, labelHeight) ) - labelPixmap->DrawImage( cPoint(left + labelHeight*2 + marginItem*2, 0), imgLoader.GetImage() ); + iconsPixmap->DrawImage( cPoint(left + labelHeight*2 + marginItem*2, 0), imgLoader.GetImage() ); if( imgLoader.LoadIcon(*forward, labelHeight, labelHeight) ) - labelPixmap->DrawImage( cPoint(left + labelHeight*3 + marginItem*3, 0), imgLoader.GetImage() ); + iconsPixmap->DrawImage( cPoint(left + labelHeight*3 + marginItem*3, 0), imgLoader.GetImage() ); } } diff --git a/displayreplay.h b/displayreplay.h index b24c46e..c073f1e 100644 --- a/displayreplay.h +++ b/displayreplay.h @@ -9,6 +9,7 @@ class cFlatDisplayReplay : public cFlatBaseRender, public cSkinDisplayReplay { int labelHeight; cPixmap *labelPixmap; cPixmap *labelJump; + cPixmap *iconsPixmap; void UpdateInfo(void); public: diff --git a/displayvolume.c b/displayvolume.c index d9b2546..ee7919a 100644 --- a/displayvolume.c +++ b/displayvolume.c @@ -14,26 +14,32 @@ cFlatDisplayVolume::cFlatDisplayVolume(void) { ProgressBarCreate(left, osdHeight - 50 - ProgressBarHeight(), width, Theme.Color(clrVolumeProgressFg), Theme.Color(clrVolumeProgressBarFg), Theme.Color(clrVolumeProgressBg)); labelPixmap = osd->CreatePixmap(1, cRect(0, osdHeight - 50 - progressBarHeight - labelHeight - marginItem, osdWidth, labelHeight)); + muteLogoPixmap = osd->CreatePixmap(2, cRect(0, osdHeight - 50 - progressBarHeight - labelHeight - marginItem, osdWidth, labelHeight)); } cFlatDisplayVolume::~cFlatDisplayVolume() { osd->DestroyPixmap(labelPixmap); - osd->DestroyPixmap(progressBarPixmap); + osd->DestroyPixmap(muteLogoPixmap); } void cFlatDisplayVolume::SetVolume(int Current, int Total, bool Mute) { labelPixmap->Fill(clrTransparent); + muteLogoPixmap->Fill(clrTransparent); + cString label = cString::sprintf("%s: %d", tr("Volume"), Current); cString maxLabel = cString::sprintf("%s: %d", tr("Volume"), 555); int maxlabelWidth = font->Width(maxLabel); int left = osdWidth / 2 - maxlabelWidth / 2; - labelPixmap->DrawText(cPoint(left, 0), *label, Theme.Color(clrVolumeFont), Theme.Color(clrVolumeBg), - font, maxlabelWidth, fontHeight, taCenter); if (Mute) { + labelPixmap->DrawText(cPoint(left, 0), *label, Theme.Color(clrVolumeFont), Theme.Color(clrVolumeBg), + font, maxlabelWidth + marginItem*2 + labelHeight, fontHeight, taLeft); if( imgLoader.LoadIcon("mute", labelHeight, labelHeight) ) { - labelPixmap->DrawImage( cPoint(left + maxlabelWidth + marginItem, 0), imgLoader.GetImage() ); + muteLogoPixmap->DrawImage( cPoint(left + maxlabelWidth + marginItem, 0), imgLoader.GetImage() ); } + } else { + labelPixmap->DrawText(cPoint(left, 0), *label, Theme.Color(clrVolumeFont), Theme.Color(clrVolumeBg), + font, maxlabelWidth, fontHeight, taLeft); } ProgressBarDraw(Current, Total); } diff --git a/displayvolume.h b/displayvolume.h index 96823d4..c98b293 100644 --- a/displayvolume.h +++ b/displayvolume.h @@ -7,10 +7,13 @@ class cFlatDisplayVolume : public cFlatBaseRender, public cSkinDisplayVolume { bool muted; cPixmap *labelPixmap; + cPixmap *muteLogoPixmap; + int labelHeight; public: cFlatDisplayVolume(void); virtual ~cFlatDisplayVolume(); virtual void SetVolume(int Current, int Total, bool Mute); + //virtual void SetAudioChannel(int AudioChannel); virtual void Flush(void); }; |