mirror of
https://github.com/tuxbox-fork-migrations/recycled-ni-neutrino.git
synced 2025-08-29 16:31:05 +02:00
CEventList: fix current channel position and ensure clean up header
Current channel name was out of center and a clean up of header
background was required because texts are only painted with transparent background and old texts are futher visible.
Now we have a clean background before repaint logo or new channel names.
Origin commit data
------------------
Branch: ni/coolstream
Commit: 5e43b1f7e1
Author: Thilo Graf <dbt@novatux.de>
Date: 2017-01-24 (Tue, 24 Jan 2017)
------------------
This commit was generated by Migit
This commit is contained in:
@@ -877,7 +877,9 @@ void CEventList::paintHead(t_channel_id _channel_id, std::string _channelname, s
|
||||
}
|
||||
else {
|
||||
header->removeCCItem(midLogo); //remove/destroy logo object, if it is not available
|
||||
CComponentsText *midText = new CComponentsText(CC_CENTERED, CC_CENTERED, mid_width, theight, _channelname, CTextBox::CENTER, g_Font[font_mid], CComponentsText::FONT_STYLE_REGULAR, header, CC_SHADOW_OFF, COL_MENUHEAD_TEXT);
|
||||
int w_midText = g_Font[font_mid]->getRenderWidth(_channelname);
|
||||
CComponentsText *midText = new CComponentsText(0, CC_CENTERED, w_midText, theight, _channelname, CTextBox::CENTER, g_Font[font_mid], CComponentsText::FONT_STYLE_REGULAR, header, CC_SHADOW_OFF, COL_MENUHEAD_TEXT);
|
||||
midText->setXPos(full_width/2 - midText->getWidth()/2);
|
||||
midText->doPaintBg(false);
|
||||
}
|
||||
|
||||
@@ -892,6 +894,8 @@ void CEventList::paintHead(t_channel_id _channel_id, std::string _channelname, s
|
||||
rText->doPaintBg(false);
|
||||
}
|
||||
|
||||
if (header->isPainted()) //clean up background of header for new captions
|
||||
header->kill(header->getColorBody());
|
||||
header->paint(CC_SAVE_SCREEN_NO);
|
||||
}
|
||||
|
||||
|
Reference in New Issue
Block a user