如何使透明的窗口透明

时间:2019-06-28 13:25:03

标签: python kivy

标题栏是隐藏的,但背景不是透明的。

Window.clearcolor = (0,0,0,.5)

此代码不透明

代码:

from kivy.config import Config
Config.set('graphics','resizable',0)
Config.set('graphics','position','custom')
Config.set('graphics','left',50)
Config.set('graphics','top',50)
Config.set('graphics', 'fullscreen', 'fake')

from kivy.app import App
from kivy.core.window import Window
from kivy.uix.floatlayout import FloatLayout

class Program(App):
    def build(self):
        Window.size = (600, 300)
        Window.borderless = True
        Window.clearcolor = (0,0,0,.5)
        duzen = FloatLayout(size=(600,310))
        self.title = "Kivy Gui 1"       

    return duzen


Program().run()

enter image description here

0 个答案:

没有答案