From e2c687cf999685ef0b5921c3ba72578927ee4803 Mon Sep 17 00:00:00 2001 From: Wonguk Jeong Date: Tue, 22 Apr 2014 20:31:49 +0200 Subject: [PATCH] terminology: recalculate textgrid size when config is updated Summary: When configuration (font size, face..) was changed, textgird size was not recalulated properly. Fixes T945 Test Plan: terminology -> maximize window -> font change (size) -> check whether max col/row are fit on window size Reviewers: raster, cedric, billiob Reviewed By: billiob CC: seoz Maniphest Tasks: T945 Differential Revision: https://phab.enlightenment.org/D772 --- src/bin/termio.c | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/src/bin/termio.c b/src/bin/termio.c index 01fd7438..ee7213d0 100644 --- a/src/bin/termio.c +++ b/src/bin/termio.c @@ -4708,7 +4708,7 @@ void termio_config_update(Evas_Object *obj) { Termio *sd = evas_object_smart_data_get(obj); - Evas_Coord w, h; + Evas_Coord w, h, ow = 0, oh = 0; char buf[4096]; EINA_SAFETY_ON_NULL_RETURN(sd); @@ -4750,7 +4750,9 @@ termio_config_update(Evas_Object *obj) if (h < 1) h = 1; sd->font.chw = w; sd->font.chh = h; - _smart_size(obj, sd->grid.w, sd->grid.h, EINA_TRUE); + + evas_object_geometry_get(obj, NULL, NULL, &ow, &oh); + _smart_size(obj, ow / w, oh / h, EINA_TRUE); } Config *