[英]How to hide/remove the default minimize/maximize buttons on window developed with Kivy?
如何删除或隐藏使用kivy创建的窗口的默认最小化或最大化按钮。
I'm not aware of a simple way to do this - it's not exposed in the kivy window api, and may not even be exposed in pygame (which is likely the backend you're using on desktop). 我不知道执行此操作的简单方法-它未在kivy窗口api中公开,甚至可能未在pygame中公开(这很可能是您在台式机上使用的后端)。
Maybe you can look up the right way to do it on each system you target, eg I think you can hint it to X11, but I don't know if this is really plausible or nice. 也许您可以在目标系统上查找正确的方法,例如,我认为您可以将其提示给X11,但我不知道这是否真的可行或不错。
We're developing a new sdl2 backend, which is more flexible about some of these kinds of things, but I don't know if it would make this possible. 我们正在开发一个新的sdl2后端,它在某些事情上更加灵活,但是我不知道这是否可以实现。
First option: 第一种选择:
(Seen on https://github.com/kivy/kivy/issues/2616 ) (见https://github.com/kivy/kivy/issues/2616 )
from kivy.config import Config
Config.set('graphics', 'borderless', 'True')
..... .....
Second option: 第二种选择:
from kivy.core.window import Window
Window.bordeless = 'True'
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.