[Sugar-devel] Sugar Screens/Canvas
James Cameron
quozl at laptop.org
Tue Mar 3 16:12:07 EST 2020
Thanks for looking into CardSort activity size [1].
What appears on screen is defined in the __init__ function of the
CardSortActivity class [2].
The call to Activity.set_canvas on line 96 connects a Gtk.DrawingArea
widget with the canvas space; that is the whole screen below the
toolbar.
Then the Gtk.DrawingArea widget is passed to the Game function for it
to draw upon [3]. The drawing occurs in response to the widget draw
callback, not an expose callback. There's some old code from GTK 2
API that was left behind and is unlikely to be needed.
I'm not sure which grid you are asking about. There are several grid
concepts.
References:
1. https://github.com/sugarlabs/cardsort/issues/9
2. https://github.com/sugarlabs/cardsort/blob/master/CardSortActivity.py#L42
3. https://github.com/sugarlabs/cardsort/blob/master/window.py#L35
On Tue, Mar 03, 2020 at 12:44:58PM -0500, Steven Higgins wrote:
> I am trying to fix a display issue in the activity CardSort and I am trying to find some information on how the canvas, and grid works so I can try to find where the issue can be resolved. Where is the screen of the activity initialized?
>
> Thanks
> Steven Higgins
> _______________________________________________
> Sugar-devel mailing list
> Sugar-devel at lists.sugarlabs.org
> http://lists.sugarlabs.org/listinfo/sugar-devel
--
James Cameron
http://quozl.netrek.org/
More information about the Sugar-devel
mailing list