PyS60 application does not work in full screen mode

I am very new to PyS60. I tested how to install the application in full screen mode, but, unfortunately, it does not work as expected. I tested the script on the Nokia 6120 Classic. Here is what I did:

appuifw.app.screen = 'full'

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

+3
source share
2 answers

Make sure you define your own functions for redrawing the screen and calling the screen back . When you rotate the device, you need to manually re-scale everything to fit the new screen size. Otherwise, you may get a half 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
+4
source

If you have not already done so, I would advise you to use the latest version of PyS60 from https://garage.maemo.org/frs/?group_id=854 and try again.

Do the other two screen modes work as they should?

0
source

Source: https://habr.com/ru/post/1709828/


All Articles