Hello, according to the Elm docs elm_object_scale_get() should return
the widget scale value that is a double value which is relative to just
that object and that should be independent from the elm_scale value.
Well, the implementation doesn't seem correct, in fact if you set an
ELM_SCALE value and you add an unscaled object, elm_object_scale_get(o)
will return the ELM_SCALE setting value. This is wrong and caused some
bugs like:
If you do something like:
printf("Pre scale: %f\n",elm_object_scale_get(o));
elm_object_scale_set(o, elm_object_scale_get(o));
printf("Post scale: %f\n",elm_object_scale_get(o));
The same values will be printed out, but the widget will be scaled up
(its edje scale value will be elm_object_scale_get(o) *
elm_scale_get()).
Since the scaling work is done by the theme_func for each widget also
changing a widget theme caused it to be scaled up (that's why the
hoversel label button is always bigger than a standard button!).
So I think that this one-line-patch should be merged, if you want to
keep elm_scale separated from elm_object_scale.
Bye.
PS: Otherwise with the current implementation every
edje_object_scale_set(wd->o, elm_widget_scale_get(o)
* _elm_config->scale);
in elm_*.c should become:
edje_object_scale_set(wd->o, elm_widget_scale_get(o));
Index: src/lib/elm_widget.c
===================================================================
--- src/lib/elm_widget.c (revisione 42476)
+++ src/lib/elm_widget.c (copia locale)
@@ -771,7 +786,7 @@
if (sd->parent_obj)
return elm_widget_scale_get(sd->parent_obj);
else
- return elm_scale_get();
+ return 1.0;
}
return sd->scale;
}
------------------------------------------------------------------------------
Come build with us! The BlackBerry® Developer Conference in SF, CA
is the only developer event you need to attend this year. Jumpstart your
developing skills, take BlackBerry mobile applications to market and stay
ahead of the curve. Join us from November 9-12, 2009. Register now!
http://p.sf.net/sfu/devconf
_______________________________________________
enlightenment-devel mailing list
enlightenment-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/enlightenment-devel