mirror of
https://github.com/tuxbox-neutrino/neutrino.git
synced 2025-08-31 01:11:12 +02:00
CComponentsHeader: rectification for 'optimize auto size mode for logos'
see commit: 76cd93555d
Additional variable was required.
Values were overwritten and had no effect.
This commit is contained in:
@@ -274,10 +274,10 @@ void CComponentsHeader::initIcon()
|
|||||||
|
|
||||||
void CComponentsHeader::initLogo()
|
void CComponentsHeader::initLogo()
|
||||||
{
|
{
|
||||||
cch_logo.dy_max = cch_logo.dy_max == -1 ? height - 2*OFFSET_INNER_MIN : cch_logo.dy_max;
|
int h_logo = cch_logo.dy_max == -1 ? height - 2*OFFSET_INNER_MIN : cch_logo.dy_max;
|
||||||
|
|
||||||
if(!cch_logo_obj)
|
if(!cch_logo_obj)
|
||||||
cch_logo_obj = new CComponentsChannelLogoScalable(width/2, height/2 - cch_logo.dy_max/2, cch_logo.Name, cch_logo.Id, this);
|
cch_logo_obj = new CComponentsChannelLogoScalable(width/2, height/2 - h_logo/2, cch_logo.Name, cch_logo.Id, this);
|
||||||
else
|
else
|
||||||
cch_logo_obj->setChannel(cch_logo.Id, cch_logo.Name);
|
cch_logo_obj->setChannel(cch_logo.Id, cch_logo.Name);
|
||||||
|
|
||||||
@@ -285,12 +285,12 @@ void CComponentsHeader::initLogo()
|
|||||||
if (cch_logo.dy_max == -1){
|
if (cch_logo.dy_max == -1){
|
||||||
int dx_orig = 0, dy_orig = 0 ;
|
int dx_orig = 0, dy_orig = 0 ;
|
||||||
cch_logo_obj->getRealSize(&dx_orig, &dy_orig);
|
cch_logo_obj->getRealSize(&dx_orig, &dy_orig);
|
||||||
if (cch_logo.dy_max > dy_orig)
|
if (h_logo > dy_orig)
|
||||||
cch_logo.dy_max = dy_orig;
|
h_logo = dy_orig;
|
||||||
}
|
}
|
||||||
|
|
||||||
if (cch_logo_obj->hasLogo()){
|
if (cch_logo_obj->hasLogo()){
|
||||||
cch_logo_obj->setHeight(cch_logo.dy_max, true);
|
cch_logo_obj->setHeight(h_logo, true);
|
||||||
|
|
||||||
// set id of logo item depends of neighbor items
|
// set id of logo item depends of neighbor items
|
||||||
int logo_id = getCCItemId(cch_logo_obj);
|
int logo_id = getCCItemId(cch_logo_obj);
|
||||||
|
Reference in New Issue
Block a user