mirror of
https://github.com/tuxbox-neutrino/neutrino.git
synced 2025-08-29 00:11:14 +02:00
CComponentsHeader: add fallback if title and logo are overlapping
Logo is now general centered on screen, not as before between title and clock
This commit is contained in:
@@ -307,8 +307,15 @@ void CComponentsHeader::initLogo()
|
|||||||
x_logo = x_logo_right;
|
x_logo = x_logo_right;
|
||||||
if (cch_logo.Align == CC_LOGO_LEFT)
|
if (cch_logo.Align == CC_LOGO_LEFT)
|
||||||
x_logo = x_logo_left;
|
x_logo = x_logo_left;
|
||||||
if (cch_logo.Align == CC_LOGO_CENTER)
|
if (cch_logo.Align == CC_LOGO_CENTER){
|
||||||
x_logo = x_logo_left + logo_space/2 - cch_logo_obj->getWidth()/2;
|
x_logo = width/2 - cch_logo_obj->getWidth()/2;
|
||||||
|
//fallback if previous item and logo are overlapping
|
||||||
|
if (getCCItem(prev_id)){
|
||||||
|
int x_tmp = x_logo_left + logo_space/2 - cch_logo_obj->getWidth()/2;
|
||||||
|
if (x_logo <= x_logo_left)
|
||||||
|
x_logo = x_tmp;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
cch_logo_obj->setXPos(x_logo);
|
cch_logo_obj->setXPos(x_logo);
|
||||||
cch_logo_obj->setYPos(height/2 - cch_logo_obj->getHeight()/2);
|
cch_logo_obj->setYPos(height/2 - cch_logo_obj->getHeight()/2);
|
||||||
|
Reference in New Issue
Block a user