Re: Still having problems with Mx.Widget subclassing



On 09/02/13 20:39, Nox Deleo wrote:
Thanks for the clarification. I did wonder about chaining up before when I looked over the C code for other Mx widgets, but I couldn't get it to work.

super(Mx.Widget, self).paint()
RuntimeError: maximum recursion depth exceeded

Weird, it works in gjs. On the other hand I know nothing about python and the way it uses introspection.


Presumably because paint on the parent recalls the do_paint function on the child. Am I doing this right? It's a bit of guesswork trying to translate the C to Python when it comes to GObject based stuff. Now to figure out how to implement the allocate function. I'll take a look at the Mx source again. Thanks again for the help.

I really can't help you with python.


P.S. I'm having some issues with gmail and the mailing list (you may have noticed a few messages ago). It seems to want to send directly to you rather than via the mailing list when I hit reply. Are you using any trick to make it play nice, or just reply all (as I suspect I should have)?

I'm using thunderbird, there is a reply-to-list button.



On 9 February 2013 20:10, Lionel Landwerlin <llandwerlin gmail com> wrote:
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


_______________________________________________
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]