PyS60 应用程序无法全屏显示

发布于 2024-07-22 21:07:50 字数 204 浏览 6 评论 0原文

我对 PyS60 很陌生。 我正在测试如何将应用程序设置为全屏模式,但不幸的是,它无法按预期工作。 我在诺基亚 6120 Classic 上测试了该脚本。 这是我所做的:

<代码> appuifw.app.screen = '完整'

我得到的是我的应用程序的半个屏幕,下面是纯白色。 我究竟做错了什么? 提前致谢。

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.

如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

扫码二维码加入Web技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。

评论(2

谷夏 2024-07-29 21:07:50

确保为屏幕重绘屏幕旋转回调定义自己的函数。 当您旋转设备时,您必须手动重新缩放所有内容以适应新的屏幕尺寸。 否则你可能会得到“屏幕的一半”效果。


    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

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
独木成林 2024-07-29 21:07:50

如果您还没有,我建议您使用 https:// 的最新版本 PyS60 Garage.maemo.org/frs/?group_id=854 并重试。

其他两种屏幕模式是否按预期工作?

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?

~没有更多了~
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文