Re: Still having problems with Mx.Widget subclassing



Ok, I was wrong, so you indeed need to override the allocate function.
We do chain up on allocate, but Clutter check whether the allocate vfunc has been changed. If that's the case, it doesn't allocate children.

Also don't forget to chain up on paint/allocate.

Regards,

-
Lionel

On 09/02/13 16:10, Nox Deleo wrote:
Forgot to mention it's the LibraryView that's in the screenshot (although it's happened with others). Got a bit of a cold this weekend, so I'm forgetting all the important things. Sorry.


On 9 February 2013 15:44, Nox Deleo <noxdeleo googlemail com> wrote:
http://pastebin.com/vzLu8nbd

It's a little on the messy side since it's been built up with experimentation while I've been learning about Clutter/Mx. I appreciate the help.


On 9 February 2013 15:40, Lionel Landwerlin <llandwerlin gmail com> wrote:
Any code we could look at?


On 09/02/13 15:31, Nox Deleo wrote:

Yeah, both in the code and in the stylesheet. I've done the same for every child as well. It works fine as a ClutterActor subclass, but I want to make use of Mx styling among other things.

On Feb 9, 2013 3:03 PM, "Lionel Landwerlin" <llandwerlin gmail com> wrote:
Have you set a size to your Mx.Widget subclass widget?

I don't think you need to override allocate, MxWidget already calls its parent allocate method.

-
Lionel

On 09/02/13 14:56, Nox Deleo wrote:
Hi,

I'm having problems getting Mx.Widget subclasses to display properly. I had a thread on this a while back which solved one issue, but showed another.

In my Mx.Widget subclasses, I'm calling paint for each child in my widget now when the parent paint vfunc is called. This is painting things (so far as I can tell), but it seems like the children are being painted 1x1 px in the top left corner, despite me setting their sizes. Do I need to override allocate for the children as well as paint, or is there some other issue here?

I've attached a screenshot showing the issue. There is an MxEntry and an MxScrollview in there containing a bunch of other widgets.


Thanks in advance.


_______________________________________________
clutter-list mailing list
clutter-list gnome org
https://mail.gnome.org/mailman/listinfo/clutter-list


_______________________________________________
clutter-list mailing list
clutter-list gnome org
https://mail.gnome.org/mailman/listinfo/clutter-list



_______________________________________________
clutter-list mailing list
clutter-list gnome org
https://mail.gnome.org/mailman/listinfo/clutter-list


_______________________________________________
clutter-list mailing list
clutter-list gnome org
https://mail.gnome.org/mailman/listinfo/clutter-list





_______________________________________________
clutter-list mailing list
clutter-list gnome org
https://mail.gnome.org/mailman/listinfo/clutter-list



[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]