mirror of
https://github.com/tuxbox-neutrino/neutrino.git
synced 2025-08-28 16:01:20 +02:00
CComponentsButton: reduce scope of variable face_x
The scope of the variable 'face_x' can be reduced. (style)
This commit is contained in:
@@ -136,14 +136,13 @@ void CComponentsButton::initCaption()
|
||||
//if we have an icon, we must calculate positions for booth items together
|
||||
//also the icon width and left position = 0
|
||||
int face_w = 0;
|
||||
int face_x = 0;
|
||||
|
||||
//calculate width and left position of icon, if available, picture position is default centered
|
||||
if (cc_btn_icon_obj){
|
||||
//if found a picture object, then get width from it...
|
||||
face_w = cc_btn_icon_obj->getWidth();
|
||||
//...and set position as centered
|
||||
face_x = width/2 - face_w/2;
|
||||
int face_x = width/2 - face_w/2;
|
||||
cc_btn_icon_obj->setXPos(face_x);
|
||||
}
|
||||
|
||||
|
Reference in New Issue
Block a user