You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
This repository was archived by the owner on Apr 11, 2026. It is now read-only.
Micro-plugin to make background blur in DearPyGui on Windows
ɪɴsᴛᴀʟʟɪɴɢ
1 | download dpg_blur.py from releases 2 | put it in the same folder as your main.py 3 | import it in your main.py
ᴇxᴀᴍᴘʟᴇs
↙️ example with decorate ↘️
fromdpg_blurimportWindowsWindowEffect, get_hwndimportdearpygui.dearpyguiasdpg# Initialize DearPyGui contextdpg.create_context()
# Initialize the dpg_blur librarywindow_effect=WindowsWindowEffect()
# Function to apply the aero effect after UI is rendereddefafter_init_ui():
# Make the window background transparentwindow_effect.setAeroEffect(get_hwnd())
# Set function to be called after rendering the UIdpg.set_frame_callback(5, after_init_ui)
# Create a viewport with transparent background (clear_color=[0, 0, 0, 0])dpg.create_viewport(title="Example", clear_color=[0, 0, 0, 0], height=100, width=100)
# Setup and display the viewportdpg.setup_dearpygui()
dpg.show_viewport()
# Run the main loop to keep the UI activewhiledpg.is_dearpygui_running():
dpg.render_dearpygui_frame()
# Destroy the context when finisheddpg.destroy_context()
↘️ example with decorate ↙️
↙️ example without decorate ↘️
importdpg_blurfromdpg_blurimportWindowsWindowEffect, get_hwndimportdearpygui.dearpyguiasdpg# Initialize DearPyGui contextdpg.create_context()
# Initialize the Windows window effect librarywindow_effect=WindowsWindowEffect()
# Function to apply the aero effect and rounded corners after UI is rendereddefafter_init_ui():
# Make the window background transparentwindow_effect.setAeroEffect(get_hwnd())
# Apply rounded corners for Windows 11 (10px radius)window_effect.setRoundedCorners(get_hwnd(), 10) # IF YOU HAVE WINDOWS 10, THEN IT DOESN'T CHANGE ANYTHING.# Set function to be called after rendering the UIdpg.set_frame_callback(20, after_init_ui)
# Create a viewport with transparent background and no decoration (clear_color=[0, 0, 0, 0])dpg.create_viewport(title="Example", decorated=False, clear_color=[0, 0, 0, 0], height=100, width=100)
# Setup and display the viewportdpg.setup_dearpygui()
dpg.show_viewport()
# Run the main loop to keep the UI activewhiledpg.is_dearpygui_running():
dpg.render_dearpygui_frame()
# Destroy the context when finisheddpg.destroy_context()
↘️ example without decorate [win 11] ↙️
---------------------------
↗️ example without decorate [win 10] ↖️ or without: 'window_effect.setRoundedCorners(get_hwnd(),10)'
v. 1.1 Made with 💟 by Agzes
About
🧩 • Its micro-plugin to make background blur for viewport in DearPyGui