mirror of
https://github.com/tuxbox-neutrino/neutrino.git
synced 2025-08-29 00:11:14 +02:00
CComponentsHeader: optimize auto size mode for logos
With very large font size settings it is possible that header is too large for reasonable display of logos, because of possible bad upscale effects (eg. step effects). So it seems it's better to use original size as largest possible size.
This commit is contained in:
@@ -281,6 +281,14 @@ void CComponentsHeader::initLogo()
|
||||
else
|
||||
cch_logo_obj->setChannel(cch_logo.Id, cch_logo.Name);
|
||||
|
||||
//ensure logo is not larger than original size if in auto mode
|
||||
if (cch_logo.dy_max == -1){
|
||||
int dx_orig = 0, dy_orig = 0 ;
|
||||
cch_logo_obj->getRealSize(&dx_orig, &dy_orig);
|
||||
if (cch_logo.dy_max > dy_orig)
|
||||
cch_logo.dy_max = dy_orig;
|
||||
}
|
||||
|
||||
if (cch_logo_obj->hasLogo()){
|
||||
cch_logo_obj->setHeight(cch_logo.dy_max, true);
|
||||
|
||||
|
@@ -319,6 +319,7 @@ class CComponentsHeader : public CComponentsForm, public CCTextScreen
|
||||
* CC_LOGO_RIGHT \n
|
||||
* @param[in] dy
|
||||
* @li optional logo height, default = -1 (auto)
|
||||
* @note In auto mode, logo use full height minus inner offset but not larger than original logo height.
|
||||
*/
|
||||
void setChannelLogo( const uint64_t& channelId,
|
||||
const std::string& channelName,
|
||||
|
Reference in New Issue
Block a user