flet icon indicating copy to clipboard operation
flet copied to clipboard

Transparent window background on linux

Open Kawue opened this issue 2 years ago • 4 comments

I tried to make the background of my window transparent using the example code given in the documentation. However, on linux mint I get a black background instead of a transparent one. Is there a workaround to get transparency on linux?

Operating system: Linux Mint Flet Version: 0.7.4

import flet as ft

def main(page: ft.Page):
    page.window_bgcolor = ft.colors.TRANSPARENT
    page.bgcolor = ft.colors.TRANSPARENT
    page.window_title_bar_hidden = True
    page.window_frameless = True
    page.window_left = 400
    page.window_top = 200
    page.add(ft.ElevatedButton("I'm a floating button!"))

ft.app(target=main)

Kawue avatar Jun 20 '23 08:06 Kawue

I also am having this problem in Arch Linux with flet version 0.17.0

pink10000 avatar Dec 24 '23 07:12 pink10000

The window_manager dart package used by Flet has an opened issue for this: https://github.com/leanflutter/window_manager/issues/179

ndonkoHenri avatar Dec 24 '23 10:12 ndonkoHenri

I see where exactly in the Flet source code I can comment out those two lines, but I am unsure how to use that change in my flet app.

pink10000 avatar Dec 24 '23 20:12 pink10000

Which lines do you mean?

ndonkoHenri avatar Jul 08 '24 21:07 ndonkoHenri

i think in the linked issue there was a workaround commented, though idk how to modify the flet source myself

tigercoding56 avatar May 22 '25 00:05 tigercoding56

I have the same problem on windows. Did anyone have a solution?

XFriday avatar Jan 11 '26 03:01 XFriday