CComponentsButton: remove additonal y offset

Any other offset could have bad side effects for centered text,
it must be centered here. Other font sizes can make problems here.


Origin commit data
------------------
Commit: 75bf3aa276
Author: Thilo Graf <dbt@novatux.de>
Date: 2014-05-03 (Sat, 03 May 2014)
This commit is contained in:
2014-05-03 16:29:03 +02:00
parent 0f83a29ff6
commit 39f4d174a7

View File

@@ -165,12 +165,12 @@ void CComponentsButton::initCaption()
int w_cap = width - fr_thickness - append_x_offset - x_cap - fr_thickness; int w_cap = width - fr_thickness - append_x_offset - x_cap - fr_thickness;
int h_cap = height - 2*fr_thickness; int h_cap = height - 2*fr_thickness;
/*FIXME: /*NOTE:
paint of centered text in y without y_offset paint of centered text in y without y_offset
looks unlovely displaced in y direction besides icon, looks unlovely displaced in y direction besides icon,
but text render isn't wrong here, because chars like e. 'q', 'y' are considered! but text render isn't wrong here, because chars like e. 'q', 'y' are considered!
*/ */
int y_cap = height/2 - h_cap/2 + append_x_offset/2 /*CC_CENTERED*/; int y_cap = height/2 - h_cap/2;
cc_btn_capt_obj->setDimensionsAll(x_cap, y_cap, w_cap, h_cap); cc_btn_capt_obj->setDimensionsAll(x_cap, y_cap, w_cap, h_cap);