mirror of
https://projects.vdr-developer.org/git/vdr-plugin-tvguide.git
synced 2023-10-05 15:01:48 +02:00
Changed channelheader to display transparent logos properly
This commit is contained in:
parent
68928cb9f0
commit
c9bc7e0735
@ -8,6 +8,7 @@ cChannelColumn::cChannelColumn(int num, cChannel *channel, cMyTime *myTime) {
|
|||||||
}
|
}
|
||||||
|
|
||||||
cChannelColumn::~cChannelColumn(void) {
|
cChannelColumn::~cChannelColumn(void) {
|
||||||
|
osdManager.releasePixmap(pixmapLogo, cString::sprintf("channelcolumn logo %s", channel->Name()));
|
||||||
grids.Clear();
|
grids.Clear();
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -16,14 +17,21 @@ void cChannelColumn::clearGrids() {
|
|||||||
}
|
}
|
||||||
|
|
||||||
void cChannelColumn::createHeader() {
|
void cChannelColumn::createHeader() {
|
||||||
color = theme.Color(clrHeader);
|
color = theme.Color(clrHeader);
|
||||||
colorBlending = theme.Color(clrHeaderBlending);
|
colorBlending = theme.Color(clrHeaderBlending);
|
||||||
caller = cString::sprintf("channelcolumn %s", channel->Name());
|
caller = cString::sprintf("channelcolumn %s", channel->Name());
|
||||||
pixmap = osdManager.requestPixmap(2, cRect(tvguideConfig.timeColWidth + num*tvguideConfig.colWidth, 0, tvguideConfig.colWidth, tvguideConfig.headerHeight),
|
pixmap = osdManager.requestPixmap(2, cRect(tvguideConfig.timeColWidth + num*tvguideConfig.colWidth, 0, tvguideConfig.colWidth, tvguideConfig.headerHeight),
|
||||||
cRect::Null, *caller);
|
cRect::Null, *caller);
|
||||||
if (!pixmap) {
|
if (!pixmap) {
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
pixmapLogo = osdManager.requestPixmap(3, cRect(tvguideConfig.timeColWidth + num*tvguideConfig.colWidth, 0, tvguideConfig.colWidth, tvguideConfig.headerHeight),
|
||||||
|
cRect::Null, *caller);
|
||||||
|
if (!pixmapLogo) {
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
pixmapLogo->Fill(clrTransparent);
|
||||||
|
|
||||||
drawBackground();
|
drawBackground();
|
||||||
cTextWrapper tw;
|
cTextWrapper tw;
|
||||||
cString headerText = cString::sprintf("%d - %s", channel->Number(), channel->Name());
|
cString headerText = cString::sprintf("%d - %s", channel->Number(), channel->Name());
|
||||||
@ -37,7 +45,7 @@ void cChannelColumn::createHeader() {
|
|||||||
if (imgLoader.LoadLogo(channel->Name())) {
|
if (imgLoader.LoadLogo(channel->Name())) {
|
||||||
cImage logo = imgLoader.GetImage();
|
cImage logo = imgLoader.GetImage();
|
||||||
int logoX = (tvguideConfig.colWidth - tvguideConfig.logoWidth)/2;
|
int logoX = (tvguideConfig.colWidth - tvguideConfig.logoWidth)/2;
|
||||||
pixmap->DrawImage(cPoint(logoX, 5), logo);
|
pixmapLogo->DrawImage(cPoint(logoX, 5), logo);
|
||||||
}
|
}
|
||||||
yStart = tvguideConfig.logoHeight + 8;
|
yStart = tvguideConfig.logoHeight + 8;
|
||||||
}
|
}
|
||||||
@ -53,6 +61,7 @@ void cChannelColumn::createHeader() {
|
|||||||
|
|
||||||
void cChannelColumn::drawHeader() {
|
void cChannelColumn::drawHeader() {
|
||||||
pixmap->SetViewPort(cRect(tvguideConfig.timeColWidth + num*tvguideConfig.colWidth, 0, tvguideConfig.colWidth, tvguideConfig.headerHeight));
|
pixmap->SetViewPort(cRect(tvguideConfig.timeColWidth + num*tvguideConfig.colWidth, 0, tvguideConfig.colWidth, tvguideConfig.headerHeight));
|
||||||
|
pixmapLogo->SetViewPort(cRect(tvguideConfig.timeColWidth + num*tvguideConfig.colWidth, 0, tvguideConfig.colWidth, tvguideConfig.headerHeight));
|
||||||
}
|
}
|
||||||
|
|
||||||
bool cChannelColumn::readGrids() {
|
bool cChannelColumn::readGrids() {
|
||||||
|
@ -7,6 +7,7 @@ class cEpgGrid;
|
|||||||
class cChannelColumn : public cListObject, public cStyledPixmap {
|
class cChannelColumn : public cListObject, public cStyledPixmap {
|
||||||
friend class cEpgGrid;
|
friend class cEpgGrid;
|
||||||
private:
|
private:
|
||||||
|
cPixmap *pixmapLogo;
|
||||||
cMyTime *myTime;
|
cMyTime *myTime;
|
||||||
int num;
|
int num;
|
||||||
cChannel *channel;
|
cChannel *channel;
|
||||||
|
Loading…
Reference in New Issue
Block a user