forked from enlightenment/efl
edje_calc: Don't add padding twice to text objects
Text objects declared in Edje will see their padding added twice, as the Evas_Object_Text itself contains the padding already. This WILL break some EDC files. It's a bug nonetheless. Should this be backported?
This commit is contained in:
parent
855c196ae8
commit
5bf1f0c918
|
@ -1478,7 +1478,7 @@ _edje_part_recalc_single_text(FLOAT_T sc EINA_UNUSED,
|
||||||
* -- Gustavo Barbieri at 20-Aug-2011
|
* -- Gustavo Barbieri at 20-Aug-2011
|
||||||
*/
|
*/
|
||||||
{
|
{
|
||||||
int tw, th, mw, mh, l, r, t, b, size;
|
int mw, mh,size;
|
||||||
char *sfont = NULL;
|
char *sfont = NULL;
|
||||||
|
|
||||||
_edje_text_class_font_get(ed, desc, &size, &sfont);
|
_edje_text_class_font_get(ed, desc, &size, &sfont);
|
||||||
|
@ -1492,12 +1492,8 @@ _edje_part_recalc_single_text(FLOAT_T sc EINA_UNUSED,
|
||||||
(!chosen_desc->text.max_x) && (!chosen_desc->text.max_y)))
|
(!chosen_desc->text.max_x) && (!chosen_desc->text.max_y)))
|
||||||
return;
|
return;
|
||||||
|
|
||||||
eo_do(ep->object,
|
// Note: No need to add padding to that, it's already in the geometry
|
||||||
evas_obj_size_get(&tw, &th),
|
eo_do(ep->object, evas_obj_size_get(&mw, &mh));
|
||||||
evas_obj_text_style_pad_get(&l, &r, &t, &b));
|
|
||||||
|
|
||||||
mw = tw + l + r;
|
|
||||||
mh = th + t + b;
|
|
||||||
|
|
||||||
if (chosen_desc->text.max_x)
|
if (chosen_desc->text.max_x)
|
||||||
{
|
{
|
||||||
|
|
Loading…
Reference in New Issue