<bdo id='GgYcx'></bdo><ul id='GgYcx'></ul>
  • <small id='GgYcx'></small><noframes id='GgYcx'>

  • <tfoot id='GgYcx'></tfoot><legend id='GgYcx'><style id='GgYcx'><dir id='GgYcx'><q id='GgYcx'></q></dir></style></legend>
    1. <i id='GgYcx'><tr id='GgYcx'><dt id='GgYcx'><q id='GgYcx'><span id='GgYcx'><b id='GgYcx'><form id='GgYcx'><ins id='GgYcx'></ins><ul id='GgYcx'></ul><sub id='GgYcx'></sub></form><legend id='GgYcx'></legend><bdo id='GgYcx'><pre id='GgYcx'><center id='GgYcx'></center></pre></bdo></b><th id='GgYcx'></th></span></q></dt></tr></i><div id='GgYcx'><tfoot id='GgYcx'></tfoot><dl id='GgYcx'><fieldset id='GgYcx'></fieldset></dl></div>

        问题将 Kivy 设置为全屏

        时间:2023-06-07

            • <legend id='hyobd'><style id='hyobd'><dir id='hyobd'><q id='hyobd'></q></dir></style></legend><tfoot id='hyobd'></tfoot>

              <small id='hyobd'></small><noframes id='hyobd'>

                <bdo id='hyobd'></bdo><ul id='hyobd'></ul>
              • <i id='hyobd'><tr id='hyobd'><dt id='hyobd'><q id='hyobd'><span id='hyobd'><b id='hyobd'><form id='hyobd'><ins id='hyobd'></ins><ul id='hyobd'></ul><sub id='hyobd'></sub></form><legend id='hyobd'></legend><bdo id='hyobd'><pre id='hyobd'><center id='hyobd'></center></pre></bdo></b><th id='hyobd'></th></span></q></dt></tr></i><div id='hyobd'><tfoot id='hyobd'></tfoot><dl id='hyobd'><fieldset id='hyobd'></fieldset></dl></div>
                    <tbody id='hyobd'></tbody>
                  本文介绍了问题将 Kivy 设置为全屏的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着跟版网的小编来一起学习吧!

                  问题描述

                  我正在尝试编写一个全屏运行 kivy 的应用程序.但这些是我的问题:

                  I'm trying to write an application that runs kivy at full screen. But these are my issues:

                  1) 当我运行命令时:

                  1) When I run the command:

                  #Config.set('graphics', 'fullscreen', 1)
                  

                  然后 kivy 似乎全时运行,但窗口的背景图像周围有很多黑色空间.即使我拉长了图像,kivy 也只是在显示时剪切了图像.

                  Then kivy appears to go full time, but the window has a lot of black spaces around the background image. Even if I elongate the image, kivy just cuts the image when showing it.

                  2) 当我运行此命令将窗口大小设置为我的屏幕大小时:

                  2) When I run this command to set the window size to the size of my screen:

                  Config.set('graphics', 'width', '1366')
                  Config.set('graphics', 'height', '768')
                  

                  这种方式实际上给了我比全屏更好的结果,但是 kivy 返回的高度参数仅为 715 而不是 768,这是我告诉 kivy 使用的值(如您所见在上面的 Config.set() 函数中).

                  This way actually gives me a better result than full screen, but kivy returns a height parameter of only 715 instead of the 768, which is the value I told kivy to use (as you can see in the Config.set() function above).

                  我的屏幕分辨率是 1366x768

                  My screen resolution is 1366x768

                  如何解决这个问题并让我的 kivy 应用真正全屏显示?

                  How can I solve this issue and make my kivy app go real full screen?

                  非常感谢

                  推荐答案

                  试试

                  from kivy.core.window import Window
                  Window.fullscreen = True
                  

                  App.run() 方法之前执行此操作,它应该切换到全屏模式.

                  Do this before you App.run() method, and it should switch to fullscreen mode.

                  干杯

                  这篇关于问题将 Kivy 设置为全屏的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持跟版网!

                  上一篇:TypeError: object.__init__() 只接受一个参数(要初始化的实例) 下一篇:在 Kivy 中显示 numpy/opencv/matplotlib 图像

                  相关文章

                  <i id='P9P1C'><tr id='P9P1C'><dt id='P9P1C'><q id='P9P1C'><span id='P9P1C'><b id='P9P1C'><form id='P9P1C'><ins id='P9P1C'></ins><ul id='P9P1C'></ul><sub id='P9P1C'></sub></form><legend id='P9P1C'></legend><bdo id='P9P1C'><pre id='P9P1C'><center id='P9P1C'></center></pre></bdo></b><th id='P9P1C'></th></span></q></dt></tr></i><div id='P9P1C'><tfoot id='P9P1C'></tfoot><dl id='P9P1C'><fieldset id='P9P1C'></fieldset></dl></div>
                1. <tfoot id='P9P1C'></tfoot>

                    <small id='P9P1C'></small><noframes id='P9P1C'>

                  1. <legend id='P9P1C'><style id='P9P1C'><dir id='P9P1C'><q id='P9P1C'></q></dir></style></legend>

                      <bdo id='P9P1C'></bdo><ul id='P9P1C'></ul>