diff options
-rw-r--r-- | config.h | 2 | ||||
-rw-r--r-- | detailview.c | 35 | ||||
-rw-r--r-- | themes/nOpacity-blue.theme | 1 | ||||
-rw-r--r-- | themes/nOpacity-darkblue.theme | 1 | ||||
-rw-r--r-- | themes/nOpacity-darkgrey.theme | 1 | ||||
-rw-r--r-- | themes/nOpacity-darkred.theme | 1 | ||||
-rw-r--r-- | themes/nOpacity-darkredNG.theme | 1 | ||||
-rw-r--r-- | themes/nOpacity-default.theme | 1 | ||||
-rw-r--r-- | themes/nOpacity-green.theme | 1 | ||||
-rw-r--r-- | themes/nOpacity-iceblue.theme | 1 | ||||
-rw-r--r-- | themes/nOpacity-light.theme | 1 |
11 files changed, 38 insertions, 8 deletions
@@ -111,6 +111,7 @@ class cNopacityConfig { #define CLR_FONTMENUITEMHIGH 0xFF363636 #define CLR_TEXTWINDOW 0xB0000000 #define CLR_DETAILVIEWBACK 0x50000000 +#define CLR_DETAILVIEWTABS 0x99242A38 //CHANNELS THEME_CLR(Theme, clrChannelBackground, CLR_MENUBACK); @@ -188,6 +189,7 @@ THEME_CLR(Theme, clrProgressBarBlendHigh, CLR_PROGRESSBARBLENDHIGH); THEME_CLR(Theme, clrMenuTextWindow, CLR_TEXTWINDOW); THEME_CLR(Theme, clrMenuChannelLogoBack, CLR_CHANNELLOGOBACK); THEME_CLR(Theme, clrMenuDetailViewBack, CLR_DETAILVIEWBACK); +THEME_CLR(Theme, clrMenuDetailViewTabs, CLR_DETAILVIEWTABS); //BUTTONS THEME_CLR(Theme, clrButtonRed, CLR_TRANSPARENT); diff --git a/detailview.c b/detailview.c index 76c9513..0ed1861 100644 --- a/detailview.c +++ b/detailview.c @@ -106,7 +106,7 @@ void cNopacityView::DrawTabs(void) { if (!pixmapTabs) {
pixmapTabs = osd->CreatePixmap(4, cRect(0, y + height - tabHeight, width, tabHeight));
}
- tColor bgColor = Theme.Color(clrMenuDetailViewBack);
+ tColor bgColor = Theme.Color(clrMenuDetailViewTabs);
pixmapTabs->Fill(clrTransparent);
pixmapTabs->DrawRectangle(cRect(0, 0, width, 2), bgColor);
int numTabs = tabs.size();
@@ -166,6 +166,10 @@ void cNopacityView::DrawFloatingContent(std::string *infoText, cTvMedia *img, cT cTextWrapper wTextFull;
int imgWidth = img->width;
int imgHeight = img->height;
+ if (imgHeight > (contentHeight - 2 * border)) {
+ imgHeight = contentHeight - 2 * border;
+ imgWidth = imgWidth * ((double)imgHeight / (double)img->height);
+ }
if (img2) {
imgWidth = max(img->width, img2->width);
imgHeight += img2->height + border;
@@ -187,16 +191,16 @@ void cNopacityView::DrawFloatingContent(std::string *infoText, cTvMedia *img, cT }
osd->Flush();
cImageLoader imgLoader;
- if (imgLoader.LoadPoster(img->path.c_str(), img->width, img->height)) {
+ if (imgLoader.LoadPoster(img->path.c_str(), imgWidth, imgHeight)) {
if (Running() && pixmapContent)
- pixmapContent->DrawImage(cPoint(width - img->width - border, border), imgLoader.GetImage());
+ pixmapContent->DrawImage(cPoint(width - imgWidth - border, border), imgLoader.GetImage());
}
if (!img2)
return;
osd->Flush();
if (imgLoader.LoadPoster(img2->path.c_str(), img2->width, img2->height)) {
if (Running() && pixmapContent)
- pixmapContent->DrawImage(cPoint(width - img2->width - border, img->height + 2*border), imgLoader.GetImage());
+ pixmapContent->DrawImage(cPoint(width - img2->width - border, imgHeight + 2*border), imgLoader.GetImage());
}
}
@@ -350,7 +354,7 @@ void cNopacityView::DrawScrollbar(void) { pixmapScrollbarBack->DrawImage(cPoint(0, 0), *image);
} else {
pixmapScrollbarBack->Fill(Theme.Color(clrMenuScrollBar));
- pixmapScrollbarBack->DrawRectangle(cRect(2,2,geoManager->menuWidthScrollbar-4,totalHeight+2), Theme.Color(clrMenuScrollBarBack));
+ pixmapScrollbarBack->DrawRectangle(cRect(2,2,geoManager->menuWidthScrollbar-4, pixmapScrollbarBack->ViewPort().Height() - 4), Theme.Color(clrMenuScrollBarBack));
}
pixmapScrollbar->DrawRectangle(cRect(3,3 + barTop,geoManager->menuWidthScrollbar-6,barHeight), Theme.Color(clrMenuScrollBar));
@@ -689,6 +693,11 @@ void cNopacitySeriesView::DrawImages(void) { int fanartHeight = 0;
if (numFanarts > 0 && series.fanarts[0].width > 0) {
fanartHeight = series.fanarts[0].height * ((double)fanartWidth / (double)series.fanarts[0].width);
+ if (fanartHeight > contentHeight - 2 * border) {
+ int fanartHeightOrig = fanartHeight;
+ fanartHeight = contentHeight - 2 * border;
+ fanartWidth = fanartWidth * ((double)fanartHeight / (double)fanartHeightOrig);
+ }
totalHeight += series.fanarts.size() * (fanartHeight + border);
}
//Poster Height
@@ -718,7 +727,7 @@ void cNopacitySeriesView::DrawImages(void) { }
}
if (imgLoader.LoadPoster(series.fanarts[i].path.c_str(), fanartWidth, fanartHeight) && Running()) {
- pixmapContent->DrawImage(cPoint(border, yPic), imgLoader.GetImage());
+ pixmapContent->DrawImage(cPoint((width - fanartWidth)/2, yPic), imgLoader.GetImage());
yPic += fanartHeight + border;
osd->Flush();
}
@@ -923,6 +932,11 @@ void cNopacityMovieView::DrawImages(void) { int fanartHeight = 0;
if (movie.fanart.width > 0 && movie.fanart.height > 0 && movie.fanart.path.size() > 0) {
fanartHeight = movie.fanart.height * ((double)fanartWidth / (double)movie.fanart.width);
+ if (fanartHeight > contentHeight - 2 * border) {
+ int fanartHeightOrig = fanartHeight;
+ fanartHeight = contentHeight - 2 * border;
+ fanartWidth = fanartWidth * ((double)fanartHeight / (double)fanartHeightOrig);
+ }
totalHeight += fanartHeight + border;
}
//Collection Fanart Height
@@ -930,6 +944,11 @@ void cNopacityMovieView::DrawImages(void) { int collectionFanartHeight = 0;
if (movie.collectionFanart.width > 0 && movie.collectionFanart.height > 0 && movie.collectionFanart.path.size() > 0) {
collectionFanartHeight = movie.collectionFanart.height * ((double)collectionFanartWidth / (double)movie.collectionFanart.width);
+ if (collectionFanartHeight > contentHeight - 2 * border) {
+ int fanartHeightOrig = collectionFanartHeight;
+ collectionFanartHeight = contentHeight - 2 * border;
+ collectionFanartWidth = collectionFanartWidth * ((double)collectionFanartHeight / (double)fanartHeightOrig);
+ }
totalHeight += collectionFanartHeight + border;
}
//Poster Height
@@ -947,14 +966,14 @@ void cNopacityMovieView::DrawImages(void) { int yPic = border;
if (movie.fanart.width > 0 && movie.fanart.height > 0 && movie.fanart.path.size() > 0) {
if (imgLoader.LoadPoster(movie.fanart.path.c_str(), fanartWidth, fanartHeight) && Running()) {
- pixmapContent->DrawImage(cPoint(border, yPic), imgLoader.GetImage());
+ pixmapContent->DrawImage(cPoint((width - fanartWidth)/2, yPic), imgLoader.GetImage());
yPic += fanartHeight + border;
osd->Flush();
}
}
if (movie.collectionFanart.width > 0 && movie.collectionFanart.height > 0 && movie.collectionFanart.path.size() > 0) {
if (imgLoader.LoadPoster(movie.collectionFanart.path.c_str(), collectionFanartWidth, collectionFanartHeight) && Running()) {
- pixmapContent->DrawImage(cPoint(border, yPic), imgLoader.GetImage());
+ pixmapContent->DrawImage(cPoint((width - collectionFanartWidth)/2, yPic), imgLoader.GetImage());
yPic += collectionFanartHeight + border;
osd->Flush();
}
diff --git a/themes/nOpacity-blue.theme b/themes/nOpacity-blue.theme index de075e2..34404d4 100644 --- a/themes/nOpacity-blue.theme +++ b/themes/nOpacity-blue.theme @@ -66,6 +66,7 @@ clrProgressBarBlendHigh = DD80B3FF clrMenuTextWindow = DD000000 clrMenuChannelLogoBack = DD858585 clrMenuDetailViewBack = 55000000 +clrMenuDetailViewTabs = 44003DF5 clrButtonRed = 99BB0000 clrButtonRedBorder = FFBB0000 clrButtonRedFont = FFFFFFFF diff --git a/themes/nOpacity-darkblue.theme b/themes/nOpacity-darkblue.theme index c0de500..00f2164 100644 --- a/themes/nOpacity-darkblue.theme +++ b/themes/nOpacity-darkblue.theme @@ -66,6 +66,7 @@ clrProgressBarBlendHigh = DD031B3C clrMenuTextWindow = DD000000 clrMenuChannelLogoBack = DD858585 clrMenuDetailViewBack = 55000000 +clrMenuDetailViewTabs = 99242A38 clrButtonRed = 99BB0000 clrButtonRedBorder = FFBB0000 clrButtonRedFont = FFFFFFFF diff --git a/themes/nOpacity-darkgrey.theme b/themes/nOpacity-darkgrey.theme index e2c2d70..2afad2b 100644 --- a/themes/nOpacity-darkgrey.theme +++ b/themes/nOpacity-darkgrey.theme @@ -66,6 +66,7 @@ clrProgressBarBlendHigh = DD80B3FF clrMenuTextWindow = BD000000 clrMenuChannelLogoBack = DD858585 clrMenuDetailViewBack = 55000000 +clrMenuDetailViewTabs = 99242A38 clrButtonRed = 99BB0000 clrButtonRedBorder = FFBB0000 clrButtonRedFont = FFFFFFFF diff --git a/themes/nOpacity-darkred.theme b/themes/nOpacity-darkred.theme index 63abf23..3f27849 100644 --- a/themes/nOpacity-darkred.theme +++ b/themes/nOpacity-darkred.theme @@ -66,6 +66,7 @@ clrProgressBarBlendHigh = DD550000 clrMenuTextWindow = DD000000 clrMenuChannelLogoBack = DD858585 clrMenuDetailViewBack = 55000000 +clrMenuDetailViewTabs = 66550000 clrButtonRed = 99BB0000 clrButtonRedBorder = FF000000 clrButtonRedFont = FFFFFFFF diff --git a/themes/nOpacity-darkredNG.theme b/themes/nOpacity-darkredNG.theme index 3175207..24bbffb 100644 --- a/themes/nOpacity-darkredNG.theme +++ b/themes/nOpacity-darkredNG.theme @@ -66,6 +66,7 @@ clrProgressBarBlendHigh = DD550000 clrMenuTextWindow = DD000000 clrMenuChannelLogoBack = DD858585 clrMenuDetailViewBack = AA000000 +clrMenuDetailViewTabs = 66660000 clrButtonRed = 99BB0000 clrButtonRedBorder = FF000000 clrButtonRedFont = FFFFFFFF diff --git a/themes/nOpacity-default.theme b/themes/nOpacity-default.theme index e206db7..bce379e 100644 --- a/themes/nOpacity-default.theme +++ b/themes/nOpacity-default.theme @@ -66,6 +66,7 @@ clrProgressBarBlendHigh = DD80B3FF clrMenuTextWindow = B0000000 clrMenuChannelLogoBack = 99C6C6C6 clrMenuDetailViewBack = 50000000 +clrMenuDetailViewTabs = 99242A38 clrButtonRed = 99BB0000 clrButtonRedBorder = FFBB0000 clrButtonRedFont = FFFFFFFF diff --git a/themes/nOpacity-green.theme b/themes/nOpacity-green.theme index 4871963..027446c 100644 --- a/themes/nOpacity-green.theme +++ b/themes/nOpacity-green.theme @@ -66,6 +66,7 @@ clrProgressBarBlendHigh = DD006600 clrMenuTextWindow = DD000000 clrMenuChannelLogoBack = DD858585 clrMenuDetailViewBack = 55000000 +clrMenuDetailViewTabs = 33006600 clrButtonRed = 99BB0000 clrButtonRedBorder = FFBB0000 clrButtonRedFont = FFFFFFFF diff --git a/themes/nOpacity-iceblue.theme b/themes/nOpacity-iceblue.theme index 0191308..13514a3 100644 --- a/themes/nOpacity-iceblue.theme +++ b/themes/nOpacity-iceblue.theme @@ -66,6 +66,7 @@ clrProgressBarBlendHigh = DD5A8998 clrMenuTextWindow = DDFFFFFF clrMenuChannelLogoBack = 99C6C6C6 clrMenuDetailViewBack = 99ABABB8 +clrMenuDetailViewTabs = 88B8B8E6 clrButtonRed = FFCC0000 clrButtonRedBorder = FF000000 clrButtonRedFont = FFFFFFFF diff --git a/themes/nOpacity-light.theme b/themes/nOpacity-light.theme index dbc566c..d107884 100644 --- a/themes/nOpacity-light.theme +++ b/themes/nOpacity-light.theme @@ -66,6 +66,7 @@ clrProgressBarBlendHigh = DDff3300 clrMenuTextWindow = AA000000 clrMenuChannelLogoBack = 99C6C6C6 clrMenuDetailViewBack = 55000000 +clrMenuDetailViewTabs = 886fac10 clrButtonRed = 99BB0000 clrButtonRedBorder = 99BB0000 clrButtonRedFont = FFFFFFFF |