r0x0r / pywebview

Build GUI for your Python program with JavaScript, HTML, and CSS

Home Page:https://pywebview.flowrl.com

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Support transparency with blurred background.

NevermindNilas opened this issue · comments

Specification

  • pywebview version: 5.0.5 ( latest available through pip install )
  • operating system: Windows 11
  • web renderer: Chromium

Description

Basically revisiting this issue without necroposting.
I would love to find out if it is possible to have a blurred background with semi-transparency.

import webview

window = webview.create_window(
    "web/main.html",
    transparent=True,
    vibrancy=True,
    resizable=False,
    width=1366,
    height=768,
)

webview.start()
        body {
            overflow: hidden;
            margin: 0;
            background-color: rgba(255, 255, 255, 0.2);
            backdrop-filter: blur(10px);
        }

An example through File Explorer + MICA:
image

if there's no direct way, maybe a similar approach to PythonBlurBehind could work?

Practicalities

  • YES: I am willing to work on this issue myself.