I have a small problem and I am working on a small app that uses the python kivy gui framework. All i want is to hide the titlebar of the main window and make the background color transparent. I searched the net intensively but I couldn't find a solution for this.
Does anyone know how to do this?
Thanks
There is a simpler way:
from kivy.app import App
from kivy.core.window import Window
class MyApp(App):
def build(self):
Window.borderless = True
# ...
http://kivy.org/docs/api-kivy.core.window.html#kivy.core.window.WindowBase.borderless
You can disable bar using kivy.config.Config
. Set fullscreen
as fake
:
from kivy.config import Config
Config.set('graphics', 'fullscreen', 'fake')
from kivy.app import App
from kivy.uix.button import Button
class MyApp(App):
def build(self):
button = Button(text="Exit", size_hint=(None, None))
button.bind(on_press=exit)
return button
if __name__ == '__main__':
MyApp().run()
You can find more configuration options here: http://kivy.org/docs/api-kivy.config.html#available-configuration-tokens For example, to also change position of window:
from kivy.config import Config
Config.set('graphics', 'fullscreen', 'fake')
Config.set('graphics', 'position', 'custom')
Config.set('graphics', 'top', '300')
Config.set('graphics', 'left', '300')
from kivy.app import App
from kivy.uix.button import Button
class MyApp(App):
def build(self):
button = Button(text="Exit", size_hint=(None, None))
button.bind(on_press=exit)
return button
if __name__ == '__main__':
MyApp().run()
Unfortunately, I don't know whether it's possible to add transparency.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With