Opened 12 years ago

Closed 11 years ago

#3807 closed enhancement (notabug)

rotation and fullscreen mode

Reported by: walter Owned by: erikos
Priority: Unspecified by Maintainer Milestone: Unspecified
Component: Sugar Version: Git as of bugdate
Severity: Unspecified Keywords:
Cc: Distribution/OS: Unspecified
Bug Status: Unconfirmed


In trying to make the layout of may activity adapt to both fullscreen mode and screen rotation, I have been frustrated by the lack of documentation. I have observed a private variable in that maintains the status the fullscreen mode, but don't know how to access it. There is an OLPC-specific mechanism for detecting screen rotation in olpc-kbdsm, but it is not documented, as far as I can tell, and it would be useful to have a mechanism in general for notifying Sugar activities that something has changed.

walterbender garycmartin: is there an activity you can recommend as an example of good handling of screen rotation?

garycmartin walterbender: example of good handling of screen rotation; no not specifically. Most do a fair job relying on standard gtk widget auto-scaling. I can't think of any off the top of my head that try and detect a change and do something more advanced (e.g. Calculate could auto switch between basic and scientific mode, or Read could auto switch between 1 column or 2 column book page layouts).
walterbender garycmartin: how to detect the change is not well documented...
garycmartin walterbender: agreed
walterbender garycmartin: I cannot even find doc on how to know if I am in fullscreen mode or not (I know when I enter, but not when I leave unless I access an internal variable in window)
manuq walterbender: maybe kbdism can be wrapped in a signal?
walterbender manuq: +1
garycmartin walterbender: I did consider at one point looking at the canvas aspect ratio to decide on portrait vs landscape when a canvas redraw was triggered, but I didn't have a good need for it back then.
walterbender manuq: are there any code snippets as to how to use kbdsm?
manuq walterbender: you could start reporting a bug for enhacement
manuq walterbender: not that I know
walterbender manuq: will do
manuq walterbender: great

Change History (3)

comment:1 Changed 12 years ago by walter

Well, rotation can be reasonably well covered by adding a gtk.gdk.CONFIGURE event handler.

self._canvas.connect('configure-event', self._configure_cb)

Detecting the status of Fullscreen mode is a bit trickier.

comment:2 Changed 11 years ago by dnarvaez

  • Component changed from sugar-toolkit to Sugar

comment:3 Changed 11 years ago by dnarvaez

  • Resolution set to notabug
  • Status changed from new to closed

Rotation is covered. We have another bug for fullscreen.

Note: See TracTickets for help on using tickets.