简体   繁体   中英

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).

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.

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.

First option:

(Seen on 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'

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

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