mirror of
https://github.com/tuxbox-neutrino/neutrino.git
synced 2025-08-28 16:01:20 +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);
|
||||
|
||||
|
Reference in New Issue
Block a user