3

I am very new to PyS60. I was testing how to set an application to full screen mode but unfortunately, it doesn't work as expected. I tested the script on Nokia 6120 Classic. Here is what I did:

appuifw.app.screen = 'full'

What I get is a half screen of my application with a plain white colour below. What am I doing wrong? Thanks in advance.

laalto
  • 150,114
  • 66
  • 286
  • 303
Dawking
  • 55
  • 5
  • You could try also asking in Forum Nokia's Python forum: http://discussion.forum.nokia.com/forum/forumdisplay.php?f=102 – laalto Jun 05 '09 at 08:40

2 Answers2

4

Make sure you define own functions for screen redraw and screen rotate callbacks. When you rotate the device, you have to manually rescale everything to fit the new screen size. Otherwise you might get that "half of screen" effect.


    canvas = img = None

    def cb_redraw(aRect=(0,0,0,0)):
        ''' Overwrite default screen redraw event handler '''
        if img:
            canvas.blit(img)

    def cb_resize(aSize=(0,0,0,0)):
        ''' Overwrite default screen resize event handler '''
        global img
        img = graphics.Image.new(canvas.size)

    appuifw.app.screen = 'full'
    canvas = appuifw.Canvas(
        resize_callback = cb_resize,
        redraw_callback = cb_redraw)
    appuifw.app.body = canvas
JOM
  • 8,139
  • 6
  • 78
  • 111
0

If you haven't already, I would advise using the latest version of PyS60 from https://garage.maemo.org/frs/?group_id=854 and trying again.

Do the other two screen modes work as they are supposed to?

michael aubert
  • 6,836
  • 1
  • 16
  • 32