mirror of
https://github.com/tuxbox-fork-migrations/recycled-ni-neutrino.git
synced 2025-08-30 00:41:09 +02:00
CComponentsButton: reduce scope of variable face_x
The scope of the variable 'face_x' can be reduced. (style)
Origin commit data
------------------
Commit: 9ac35f0d92
Author: Thilo Graf <dbt@novatux.de>
Date: 2013-12-24 (Tue, 24 Dec 2013)
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