简体   繁体   English

Kivy 应用程序大小固定在全屏窗口

[英]Kivy App size fixed in full screen windowed

I've made a windows app with Kivy and I want to set the size of the window to a fixed size which is full-screen windowed and I can't figure it out.我用 Kivy 制作了一个 windows 应用程序,我想将 window 的大小设置为全屏窗口的固定大小,我无法计算出来。 i've tried this method:我试过这个方法:

from kivy.core.window import Window
Window.size = (1920, 1080)
Window.fullscreen = True

It makes the app full screen but not full screen windowed.它使应用程序全屏但不是全屏窗口。 Does anyone have a solution for this please?请问有人有解决方案吗?

Config.set determines the size of the window and should be indicated at the very beginning of the script. Config.set确定 window 的大小,应在脚本的最开始处说明。 For more information check https://kivy.org/doc/stable/api-kivy.config.html有关更多信息,请查看https://kivy.org/doc/stable/api-kivy.config.html

from kivy.config import Config
Config.set('graphics', 'width', '1920')
Config.set('graphics', 'height', '1080')

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM