On Mon, 2010-07-26 at 17:57 -0700, Dioselin Courter wrote:
> protected override void allocate(ActorBox box,
> AllocationFlags flags){
> base.allocate(box, flags);
> float width = box.get_width()*0.9f;
> _label.font_name = "Arial Bold " + width.to_string() + "px";
> _label.allocate(box,flags);
> }
setting the :font-name property will queue a relayout - in the middle of
a re-layout. it has to do so because the size of a Text actor depends
entirely on the size of its contents.
if you want to change the font in response to width changes I suggest
you use an idle handler, with clutter_threads_add_idle().
ciao,
Emmanuele.
--
Emmanuele Bassi, Open Source Software Engineer
Intel Open Source Technology Center
_______________________________________________
clutter-app-devel-list mailing list
[email protected]
http://lists.clutter-project.org/listinfo/clutter-app-devel-list