summaryrefslogtreecommitdiff
path: root/legacy/emotion/src/lib/emotion_smart.c
diff options
context:
space:
mode:
authorCarsten Haitzler <raster@rasterman.com>2011-10-06 02:41:24 +0000
committerCarsten Haitzler <raster@rasterman.com>2011-10-06 02:41:24 +0000
commit37f505d4ce41f242874bc49b3af5d60eb0ae29a2 (patch)
tree2e7fded77ae73eefbbfb5d98ff80ffd055b0dc1a /legacy/emotion/src/lib/emotion_smart.c
parente5c1e7cc4ff795ba68d4a097e5b799509a4d3711 (diff)
fix resize handling for emotion
SVN revision: 63868
Diffstat (limited to '')
-rw-r--r--legacy/emotion/src/lib/emotion_smart.c12
1 files changed, 10 insertions, 2 deletions
diff --git a/legacy/emotion/src/lib/emotion_smart.c b/legacy/emotion/src/lib/emotion_smart.c
index d3f32c9bee..9a777d5a21 100644
--- a/legacy/emotion/src/lib/emotion_smart.c
+++ b/legacy/emotion/src/lib/emotion_smart.c
@@ -79,6 +79,8 @@ struct _Smart_Data
79 int b; /* bottom */ 79 int b; /* bottom */
80 Evas_Object *clipper; 80 Evas_Object *clipper;
81 } crop; 81 } crop;
82
83 int w, h;
82 84
83 double ratio; 85 double ratio;
84 double pos; 86 double pos;
@@ -410,7 +412,10 @@ emotion_object_file_set(Evas_Object *obj, const char *file)
410 DBG("file=%s", file); 412 DBG("file=%s", file);
411 if (!sd->module) return EINA_FALSE; 413 if (!sd->module) return EINA_FALSE;
412 414
413 if ((file) && (sd->file) && (file == sd->file || !strcmp(file, sd->file))) return EINA_FALSE; 415 sd->w = 0;
416 sd->h = 0;
417 if ((file) && (sd->file) &&
418 ((file == sd->file) || (!strcmp(file, sd->file)))) return EINA_FALSE;
414 if ((file) && (file[0] != 0)) 419 if ((file) && (file[0] != 0))
415 { 420 {
416 eina_stringshare_replace(&sd->file, file); 421 eina_stringshare_replace(&sd->file, file);
@@ -780,7 +785,8 @@ emotion_object_size_get(const Evas_Object *obj, int *iw, int *ih)
780 if (iw) *iw = 0; 785 if (iw) *iw = 0;
781 if (ih) *ih = 0; 786 if (ih) *ih = 0;
782 E_SMART_OBJ_GET(sd, obj, E_OBJ_NAME); 787 E_SMART_OBJ_GET(sd, obj, E_OBJ_NAME);
783 evas_object_image_size_get(sd->obj, iw, ih); 788 if (iw) *iw = sd->w;
789 if (ih) *ih = sd->h;
784} 790}
785 791
786EAPI void 792EAPI void
@@ -1480,6 +1486,8 @@ _emotion_frame_resize(Evas_Object *obj, int w, int h, double ratio)
1480 evas_object_image_size_get(sd->obj, &iw, &ih); 1486 evas_object_image_size_get(sd->obj, &iw, &ih);
1481 if ((w != iw) || (h != ih)) 1487 if ((w != iw) || (h != ih))
1482 { 1488 {
1489 sd->w = w;
1490 sd->h = h;
1483 _emotion_image_data_zero(sd->obj); 1491 _emotion_image_data_zero(sd->obj);
1484 changed = 1; 1492 changed = 1;
1485 } 1493 }