evas_object_image_fill_set(img, offset_x, offset_y, w, h);
- /* TIZEN_ONLY(20200706): Set hit_rect geometry to the same with object.
- *
- * This fixes backward compatibility issue of supporting "clicked" event.
- * In the past version, "clicked" event happens although image file is
- * not set and resizable is false and scale type is expand.
- */
- if (sd->scale_type == EFL_GFX_IMAGE_SCALE_METHOD_EXPAND)
- {
- x = ox;
- y = oy;
- w = ow;
- h = oh;
- }
- /* END */
-
if (ow - w < 0)
{
x = ox;
else
evas_object_geometry_set(img, x, y, w, h);
- evas_object_geometry_set(sd->hit_rect, x, y, w, h);
+ /* TIZEN_ONLY(20200706): Set hit_rect geometry to the same with object.
+ *
+ * This fixes backward compatibility issue of supporting "clicked" event.
+ * In the past version, "clicked" event happens although image file is not
+ * set and resizable is false and scale type is expand.
+ *
+ * This also fixes the bug in the past version related to hit_rect size.
+ * In the past version, hit_rect geometry is not the same with object if
+ * image file is not set and resizable is false and scale type is not expand.
+ * e.g. In the past version, if object size is (360, 80), then hit_rect size
+ * is set to be (360, 360).
+ */
+ //evas_object_geometry_set(sd->hit_rect, x, y, w, h);
+ if (img_no_resize)
+ evas_object_geometry_set(sd->hit_rect, ox, oy, ow, oh);
+ else
+ evas_object_geometry_set(sd->hit_rect, x, y, w, h);
+ /* END */
}
static inline void