diff options
author | Martin Schirrmacher <vdr.skinflat@schirrmacher.eu> | 2013-08-07 21:56:31 +0200 |
---|---|---|
committer | Martin Schirrmacher <vdr.skinflat@schirrmacher.eu> | 2013-08-07 21:56:31 +0200 |
commit | 4a455b25d5497b5877ef71b976b6bf15af3a2fcd (patch) | |
tree | b0d4e1cb03fe7aa1b3ec608ba478a2242f30f5bb | |
parent | de4978527d390b6bc560fdd0411a8645ca7d104f (diff) | |
download | skin-flat-4a455b25d5497b5877ef71b976b6bf15af3a2fcd.tar.gz skin-flat-4a455b25d5497b5877ef71b976b6bf15af3a2fcd.tar.bz2 |
several fixes
-rw-r--r-- | baserender.c | 73 | ||||
-rw-r--r-- | baserender.h | 2 | ||||
-rw-r--r-- | displaymenu.c | 4 | ||||
-rw-r--r-- | displayreplay.c | 8 | ||||
-rw-r--r-- | flat.h | 14 | ||||
-rw-r--r-- | icons/default/mute.png | bin | 2665 -> 2572 bytes | |||
-rw-r--r-- | icons/white/mute.png | bin | 8345 -> 2331 bytes | |||
-rw-r--r-- | themes/flat-default.theme | 50 | ||||
-rw-r--r-- | themes/flat-white.theme | 16 |
9 files changed, 94 insertions, 73 deletions
diff --git a/baserender.c b/baserender.c index 8ada248..11bca47 100644 --- a/baserender.c +++ b/baserender.c @@ -311,19 +311,21 @@ void cFlatBaseRender::ProgressBarCreate(int Left, int Top, int Width, tColor Col progressBarColorBarFg = ColorBarFg; progressBarColorBg = ColorBg; + progressBarColorBarCurFg = Theme.Color(clrReplayProgressBarCurFg); + progressBarPixmap = osd->CreatePixmap(2, cRect(Left, Top, Width, progressBarHeight)); progressBarPixmap->Fill(clrTransparent); } void cFlatBaseRender::ProgressBarDraw(int Current, int Total) { - int top = progressBarHeight / 2 - 3; + int top = progressBarHeight / 2; double percentLeft = ((double)Current) / (double)Total; progressBarPixmap->Fill( progressBarColorBg ); - progressBarPixmap->DrawRectangle(cRect( 0, top + 2, progressBarWidth, 2), progressBarColorFg); + progressBarPixmap->DrawRectangle(cRect( 0, top-1, progressBarWidth, 2), progressBarColorFg); if (Current > 0) - progressBarPixmap->DrawRectangle(cRect( 0, top, (progressBarWidth * percentLeft), 6), progressBarColorBarFg); + progressBarPixmap->DrawRectangle(cRect( 0, top - 4, (progressBarWidth * percentLeft), 8), progressBarColorBarFg); } int cFlatBaseRender::ProgressBarHeight(void) { @@ -337,29 +339,44 @@ void cFlatBaseRender::ProgressBarDrawMarks(int Current, int Total, const cMarks int posMark = 0, posMarkLast = 0; int posCurrent; - int top = progressBarHeight / 2 - 3; + int top = progressBarHeight / 2; progressBarPixmap->Fill( progressBarColorBg ); - // the small line - progressBarPixmap->DrawRectangle(cRect( 0, top + 2, progressBarWidth, 2), progressBarColorFg); + if( !Marks ) { + progressBarColorFg = progressBarColorBarCurFg; + progressBarColorBarFg = progressBarColorBarCurFg; - if( Marks ) { - bool Start = true; - for( const cMark *m = Marks->First(); m; m = Marks->Next(m) ) { - posMark = ProgressBarMarkPos( m->Position(), Total ); - posCurrent = ProgressBarMarkPos( Current, Total ); + ProgressBarDraw(Current, Total); + return; + } + if( !Marks->First() ) { + progressBarColorFg = progressBarColorBarCurFg; + progressBarColorBarFg = progressBarColorBarCurFg; - ProgressBarDrawMark(posMark, posMarkLast, posCurrent, Start, m->Position() == Current); - posMarkLast = posMark; - Start = !Start; - } - if( !Start ) { - progressBarPixmap->DrawRectangle(cRect( posMarkLast, top, progressBarWidth - posMarkLast, 6), progressBarColorBarFg); - if( posCurrent > posMarkLast ) - progressBarPixmap->DrawRectangle(cRect( posMarkLast, top, posCurrent - posMarkLast, 6), progressBarColorMarkCurrent); - } - } else { ProgressBarDraw(Current, Total); + return; + } + + // the small line + progressBarPixmap->DrawRectangle(cRect( 0, top - 1, progressBarWidth, 2), progressBarColorFg); + + bool Start = true; + for( const cMark *m = Marks->First(); m; m = Marks->Next(m) ) { + posMark = ProgressBarMarkPos( m->Position(), Total ); + posCurrent = ProgressBarMarkPos( Current, Total ); + + ProgressBarDrawMark(posMark, posMarkLast, posCurrent, Start, m->Position() == Current); + posMarkLast = posMark; + Start = !Start; + } + if( !Start ) { + progressBarPixmap->DrawRectangle(cRect( posMarkLast, top - 3, progressBarWidth - posMarkLast, 6), progressBarColorBarFg); + if( posCurrent > posMarkLast ) + progressBarPixmap->DrawRectangle(cRect( posMarkLast, top - 3, posCurrent - posMarkLast, 6), progressBarColorBarCurFg); + } else { + // marker + progressBarPixmap->DrawRectangle(cRect( posMarkLast, top - 1, posCurrent - posMarkLast, 2), progressBarColorBarCurFg); + progressBarPixmap->DrawRectangle(cRect( posCurrent - 3, top-3, 6, 6), progressBarColorBarCurFg); } } @@ -369,16 +386,16 @@ int cFlatBaseRender::ProgressBarMarkPos(int P, int Total) { void cFlatBaseRender::ProgressBarDrawMark(int posMark, int posMarkLast, int posCurrent, bool Start, bool isCurrent) { - int top = progressBarHeight / 2 - 3; + int top = progressBarHeight / 2; if( Start ) { if( posCurrent > posMark ) - progressBarPixmap->DrawRectangle(cRect( posMarkLast, top + 2, posMark - posMarkLast, 2), progressBarColorMarkCurrent); + progressBarPixmap->DrawRectangle(cRect( posMarkLast, top - 1, posMark - posMarkLast, 2), progressBarColorBarCurFg); else { // marker - progressBarPixmap->DrawRectangle(cRect( posCurrent - 3, top, 6, 6), progressBarColorMarkCurrent); + progressBarPixmap->DrawRectangle(cRect( posCurrent - 3, top-3, 6, 6), progressBarColorBarCurFg); if( posCurrent > posMarkLast ) - progressBarPixmap->DrawRectangle(cRect( posMarkLast, top + 2, posCurrent - posMarkLast, 2), progressBarColorMarkCurrent); + progressBarPixmap->DrawRectangle(cRect( posMarkLast, top - 1, posCurrent - posMarkLast, 2), progressBarColorBarCurFg); } if( isCurrent ) @@ -387,11 +404,11 @@ void cFlatBaseRender::ProgressBarDrawMark(int posMark, int posMarkLast, int posC progressBarPixmap->DrawRectangle(cRect( posMark-3, 0, 6, 3), progressBarColorMark); } else { if( posCurrent > posMark ) - progressBarPixmap->DrawRectangle(cRect( posMarkLast, top, posMark - posMarkLast, 6), progressBarColorMarkCurrent); + progressBarPixmap->DrawRectangle(cRect( posMarkLast, top-3, posMark - posMarkLast, 6), progressBarColorBarCurFg); else { - progressBarPixmap->DrawRectangle(cRect( posMarkLast, top, posMark - posMarkLast, 6), progressBarColorBarFg); + progressBarPixmap->DrawRectangle(cRect( posMarkLast, top-3, posMark - posMarkLast, 6), progressBarColorBarFg); if( posCurrent > posMarkLast ) - progressBarPixmap->DrawRectangle(cRect( posMarkLast, top, posCurrent - posMarkLast, 6), progressBarColorMarkCurrent); + progressBarPixmap->DrawRectangle(cRect( posMarkLast, top-3, posCurrent - posMarkLast, 6), progressBarColorBarCurFg); } if( isCurrent ) diff --git a/baserender.h b/baserender.h index 4033545..698e1c6 100644 --- a/baserender.h +++ b/baserender.h @@ -29,7 +29,7 @@ class cFlatBaseRender // Progressbar cPixmap *progressBarPixmap; int progressBarHeight, progressBarTop, progressBarWidth; - tColor progressBarColorFg, progressBarColorBarFg, progressBarColorBg; + tColor progressBarColorFg, progressBarColorBarFg, progressBarColorBarCurFg, progressBarColorBg; tColor progressBarColorMark, progressBarColorMarkCurrent; // Buttons rot, grün, gelb, blau diff --git a/displaymenu.c b/displaymenu.c index 2ec8f09..f120b8d 100644 --- a/displaymenu.c +++ b/displaymenu.c @@ -9,7 +9,7 @@ cFlatDisplayMenu::cFlatDisplayMenu(void) { itemHeight = fontHeight + 2; scrollBarWidth = 20; - scrollBarHeight = osdHeight - (topBarHeight + buttonsHeight + marginItem*2 ); + scrollBarHeight = osdHeight - (topBarHeight + buttonsHeight + marginItem*3 ); scrollBarTop = topBarHeight + marginItem; menuWidth = osdWidth - scrollBarWidth; @@ -17,7 +17,7 @@ cFlatDisplayMenu::cFlatDisplayMenu(void) { menuPixmap = osd->CreatePixmap(1, cRect(0, topBarHeight + marginItem, menuWidth, scrollBarHeight )); contentTop = topBarHeight + marginItem + fontHeight + (fontSmlHeight*2) + marginItem*3; - ContentCreate(0, contentTop, menuWidth, scrollBarHeight - fontHeight*2 -3); + ContentCreate(0, contentTop, menuWidth, scrollBarHeight - fontHeight - fontSmlHeight*2 - marginItem); scrollbarPixmap = osd->CreatePixmap(2, cRect(osdWidth - scrollBarWidth, scrollBarTop, scrollBarWidth, scrollBarHeight)); diff --git a/displayreplay.c b/displayreplay.c index 5ba88f6..d916850 100644 --- a/displayreplay.c +++ b/displayreplay.c @@ -12,10 +12,10 @@ cFlatDisplayReplay::cFlatDisplayReplay(bool ModeOnly) { 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, + ProgressBarCreate(0, osdHeight - labelHeight - ProgressBarHeight(), osdWidth, Theme.Color(clrReplayProgressFg), Theme.Color(clrReplayProgressBarFg), Theme.Color(clrReplayProgressBg)); - labelJump = osd->CreatePixmap(1, cRect(0, osdHeight - labelHeight - ProgressBarHeight() - marginItem*2 - fontHeight, osdWidth, fontHeight)); + labelJump = osd->CreatePixmap(1, cRect(0, osdHeight - labelHeight - ProgressBarHeight() - marginItem - fontHeight, osdWidth, fontHeight)); labelPixmap->Fill(Theme.Color(clrReplayBg)); labelJump->Fill(clrTransparent); @@ -74,13 +74,13 @@ void cFlatDisplayReplay::SetMode(bool Play, bool Forward, int Speed) { pause = "pause"; play = "play"; forward = "forward_sel"; - labelPixmap->DrawText(cPoint(left + fontHeight*4 + marginItem*4, 0), speed, Theme.Color(clrReplayFont), Theme.Color(clrReplayBg), font); + labelPixmap->DrawText(cPoint(left + fontHeight*4 + marginItem*4, 0), speed, Theme.Color(clrReplayFontSpeed), Theme.Color(clrReplayBg), font); } else { rewind = "rewind_sel"; pause = "pause"; play = "play"; forward = "forward"; - labelPixmap->DrawText(cPoint(left - font->Width(speed) - marginItem, 0), speed, Theme.Color(clrReplayFont), Theme.Color(clrReplayBg), font); + labelPixmap->DrawText(cPoint(left - font->Width(speed) - marginItem, 0), speed, Theme.Color(clrReplayFontSpeed), Theme.Color(clrReplayBg), font); } } @@ -49,8 +49,8 @@ THEME_CLR(Theme, clrChannelBg, 0xCC101010); THEME_CLR(Theme, clrChannelFontTitle, 0xFF3090B0); THEME_CLR(Theme, clrChannelFontEpg, 0xFFEEEEEE); THEME_CLR(Theme, clrChannelFontEpgFollow, 0xFFA0A0A0); -THEME_CLR(Theme, clrChannelProgressFg, 0xFFEEEEEE); -THEME_CLR(Theme, clrChannelProgressBarFg, 0xFFEEEEEE); +THEME_CLR(Theme, clrChannelProgressFg, 0xFF3090B0); +THEME_CLR(Theme, clrChannelProgressBarFg, 0xFF3090B0); THEME_CLR(Theme, clrChannelProgressBg, 0xCC101010); // Menu @@ -60,8 +60,8 @@ THEME_CLR(Theme, clrItemCurrentBg, 0xCC3090B0); THEME_CLR(Theme, clrItemCurrentFont, 0xFFEEEEEE); THEME_CLR(Theme, clrItemSelableBg, 0xCC101010); THEME_CLR(Theme, clrItemSelableFont, 0xFFEEEEEE); -THEME_CLR(Theme, clrScrollbarFg, 0xFFEEEEEE); -THEME_CLR(Theme, clrScrollbarBarFg, 0xFFEEEEEE); +THEME_CLR(Theme, clrScrollbarFg, 0xFF3090B0); +THEME_CLR(Theme, clrScrollbarBarFg, 0xFF3090B0); THEME_CLR(Theme, clrScrollbarBg, 0xCC101010); // Menu Event THEME_CLR(Theme, clrMenuEventBg, 0xCC101010); @@ -78,8 +78,10 @@ THEME_CLR(Theme, clrMenuTextFont, 0xFFEEEEEE); // Replay THEME_CLR(Theme, clrReplayBg, 0xCC101010); THEME_CLR(Theme, clrReplayFont, 0xFFEEEEEE); +THEME_CLR(Theme, clrReplayFontSpeed, 0xFF3090B0); THEME_CLR(Theme, clrReplayProgressFg, 0xFFEEEEEE); THEME_CLR(Theme, clrReplayProgressBarFg, 0xFFEEEEEE); +THEME_CLR(Theme, clrReplayProgressBarCurFg, 0xFF3090B0); THEME_CLR(Theme, clrReplayProgressBg, 0xCC101010); THEME_CLR(Theme, clrReplayMarkFg, 0xFFEEEEEE); THEME_CLR(Theme, clrReplayMarkCurrentFg, 0xFF3090B0); @@ -93,8 +95,8 @@ THEME_CLR(Theme, clrTrackItemCurrentFont, 0xFFEEEEEE); // Volume THEME_CLR(Theme, clrVolumeBg, 0xCC101010); THEME_CLR(Theme, clrVolumeFont, 0xFFEEEEEE); -THEME_CLR(Theme, clrVolumeProgressFg, 0xFFEEEEEE); -THEME_CLR(Theme, clrVolumeProgressBarFg, 0xFFEEEEEE); +THEME_CLR(Theme, clrVolumeProgressFg, 0xFF3090B0); +THEME_CLR(Theme, clrVolumeProgressBarFg, 0xFF3090B0); THEME_CLR(Theme, clrVolumeProgressBg, 0xCC101010); class cFlat : public cSkin { diff --git a/icons/default/mute.png b/icons/default/mute.png Binary files differindex 91fc4f8..f4c2bba 100644 --- a/icons/default/mute.png +++ b/icons/default/mute.png diff --git a/icons/white/mute.png b/icons/white/mute.png Binary files differindex ff14bd7..54a8f0b 100644 --- a/icons/white/mute.png +++ b/icons/white/mute.png diff --git a/themes/flat-default.theme b/themes/flat-default.theme index 1cc181a..b2e6069 100644 --- a/themes/flat-default.theme +++ b/themes/flat-default.theme @@ -1,57 +1,59 @@ Description = Default -clrTopBarBg = BB101010 +clrTopBarBg = CC101010 clrTopBarFont = FFEEEEEE clrTopBarTimeFont = FFEEEEEE clrTopBarDateFont = FFA0A0A0 -clrButtonBg = BB101010 +clrButtonBg = CC101010 clrButtonFont = FFEEEEEE clrButtonRed = FFBB0000 clrButtonGreen = FF00BB00 clrButtonYellow = FFBBBB00 clrButtonBlue = FF0000BB -clrMessageBg = BB101010 +clrMessageBg = CC101010 clrMessageFont = FFEEEEEE clrMessageStatus = FF0000FF clrMessageInfo = FF009900 clrMessageWarning = FFBBBB00 clrMessageError = FFBB0000 -clrChannelBg = BB101010 +clrChannelBg = CC101010 clrChannelFontTitle = FF3090B0 clrChannelFontEpg = FFEEEEEE clrChannelFontEpgFollow = FFA0A0A0 -clrChannelProgressFg = FFEEEEEE -clrChannelProgressBarFg = FFEEEEEE -clrChannelProgressBg = BB101010 -clrItemBg = BB909090 +clrChannelProgressFg = FF3090B0 +clrChannelProgressBarFg = FF3090B0 +clrChannelProgressBg = CC101010 +clrItemBg = CC909090 clrItemFont = FFEEEEEE -clrItemCurrentBg = BB3090B0 +clrItemCurrentBg = CC3090B0 clrItemCurrentFont = FFEEEEEE -clrItemSelableBg = BB101010 +clrItemSelableBg = CC101010 clrItemSelableFont = FFEEEEEE -clrScrollbarFg = FFEEEEEE -clrScrollbarBarFg = FFEEEEEE -clrScrollbarBg = BB101010 -clrMenuEventBg = BB101010 +clrScrollbarFg = FF3090B0 +clrScrollbarBarFg = FF3090B0 +clrScrollbarBg = CC101010 +clrMenuEventBg = CC101010 clrMenuEventFontTitle = FF3090B0 clrMenuEventFontInfo = FFEEEEEE -clrMenuRecBg = BB101010 +clrMenuRecBg = CC101010 clrMenuRecFontTitle = FF3090B0 clrMenuRecFontInfo = FFEEEEEE -clrMenuTextBg = BB101010 +clrMenuTextBg = CC101010 clrMenuTextFont = FFEEEEEE -clrReplayBg = BB101010 +clrReplayBg = CC101010 clrReplayFont = FFEEEEEE +clrReplayFontSpeed = FF3090B0 clrReplayProgressFg = FFEEEEEE clrReplayProgressBarFg = FFEEEEEE -clrReplayProgressBg = BB101010 +clrReplayProgressBarCurFg = FF3090B0 +clrReplayProgressBg = CC101010 clrReplayMarkFg = FFEEEEEE clrReplayMarkCurrentFg = FF3090B0 -clrTrackItemBg = BB101010 +clrTrackItemBg = CC101010 clrTrackItemFont = FFEEEEEE -clrTrackItemCurrentBg = BB3090B0 +clrTrackItemCurrentBg = CC3090B0 clrTrackItemCurrentFont = FFEEEEEE -clrVolumeBg = BB101010 +clrVolumeBg = CC101010 clrVolumeFont = FFEEEEEE -clrVolumeProgressFg = FFEEEEEE -clrVolumeProgressBarFg = FFEEEEEE -clrVolumeProgressBg = BB101010 +clrVolumeProgressFg = FF3090B0 +clrVolumeProgressBarFg = FF3090B0 +clrVolumeProgressBg = CC101010 diff --git a/themes/flat-white.theme b/themes/flat-white.theme index e98da10..617f65e 100644 --- a/themes/flat-white.theme +++ b/themes/flat-white.theme @@ -19,8 +19,8 @@ clrChannelBg = BBCCCCCC clrChannelFontTitle = FF206277 clrChannelFontEpg = FF222222 clrChannelFontEpgFollow = FF505050 -clrChannelProgressFg = FF222222 -clrChannelProgressBarFg = FF222222 +clrChannelProgressFg = FF206277 +clrChannelProgressBarFg = FF206277 clrChannelProgressBg = BBCCCCCC clrItemBg = BB808080 clrItemFont = FF222222 @@ -28,9 +28,9 @@ clrItemCurrentBg = BB3090B0 clrItemCurrentFont = FF222222 clrItemSelableBg = BBCCCCCC clrItemSelableFont = FF222222 -clrScrollbarFg = FF222222 +clrScrollbarFg = FF206277 clrScrollbarBg = BBCCCCCC -clrScrollbarBarFg = FF222222 +clrScrollbarBarFg = FF206277 clrMenuEventBg = BBCCCCCC clrMenuEventFontTitle = FF206277 clrMenuEventFontInfo = FF222222 @@ -42,16 +42,16 @@ clrMenuTextFont = FF222222 clrReplayBg = BBCCCCCC clrReplayFont = FF222222 clrReplayProgressFg = FF222222 -clrReplayProgressBarFg = FF222222 +clrReplayProgressBarFg = FF206277 clrReplayProgressBg = BBCCCCCC clrReplayMarkFg = FF222222 -clrReplayMarkCurrentFg = FF3090B0 +clrReplayMarkCurrentFg = FF206277 clrTrackItemBg = BBCCCCCC clrTrackItemFont = FF222222 clrTrackItemCurrentBg = BB6AB0C0 clrTrackItemCurrentFont = FF222222 clrVolumeBg = BBCCCCCC clrVolumeFont = FF222222 -clrVolumeProgressFg = FF222222 -clrVolumeProgressBarFg = FF222222 +clrVolumeProgressFg = FF206277 +clrVolumeProgressBarFg = FF206277 clrVolumeProgressBg = BBCCCCCC |