-
-
Notifications
You must be signed in to change notification settings - Fork 608
5.3
#1500
-
⚡ Features
All
Native window object for each platform is now exposedwindow.native
. You can use it for example for applying custom appearance to a window. Additionally WebView is exposed viawindow.native.webview
All
Newwindow.events.before_show
event.All
New DomEventHandlerdebounce
parameter. It can be used it for solving performance issues withdragover
andmouseover
events.GTK/QT
application icon support for GTK and QT platformswebview.start(icon=<path>)
🚀 Improvements
All
Storage path is now verified for write permissions before application start. An exception is thrown, if path is not writable.All
Refined logic at which point of the startup procedureshown
event is fired.Cocoa
Better handling of stopping event loop in headless environments.Windows
Fallback to WinForms when QT is forced and not availableWindows
Remove white border in a fullscreen window.Windows
Support multiple selection in open folder dialog.
🐞 Bug fixes
All
Support for Unicode filenames in drag and drop. Thanks @hustshenlCocoa
Fix open file dialog file type selector and all files filterCocoa
Fix folder drag and drop. Thanks @pythonsGTK
Fix multiple file drag and drop on certain Linux distributions. Thanks @coffeejunkQT
QT6 compatilibityQT
Release of profile requested but WebEnginePage still not deleted with multiple windowsWindows
Graceful handling forshcore.dll
not being present on Windows 7. Thanks @rafael-vasconcellos.Windows
Return result of open folder dialog is fixed to tuple.Edge Chromium
Current url not being updated after a navigation event. Thanks @hustshenl
This discussion was created from the release 5.3.
Beta Was this translation helpful? Give feedback.
All reactions
Replies: 1 comment 1 reply
-
img_v3_02gv_fa96f985-0d2b-4117-95e8-502fefe8694g
@r0x0r how to custom window appearance, would u give a simple example?
Beta Was this translation helpful? Give feedback.
All reactions
1 reply
-
Here is a simple example on how to enable dark mode on Windows 11.
import webview import ctypes from ctypes import wintypes DWMWA_USE_IMMERSIVE_DARK_MODE = 20 # Windows 11 specific attribute user32 = ctypes.WinDLL("user32", use_last_error=True) dwmapi = ctypes.WinDLL("dwmapi", use_last_error=True) def on_before_show(window): print('Native window object', window.native) value = ctypes.c_int(1) # Enable dark mode (0 to disable) dwmapi.DwmSetWindowAttribute( wintypes.HWND(window.native.Handle.ToInt32()), DWMWA_USE_IMMERSIVE_DARK_MODE, ctypes.byref(value), ctypes.sizeof(value) ) if __name__ == '__main__': window = webview.create_window( 'Simple browser', 'https://pywebview.flowrl.com/' ) window.events.before_show += on_before_show webview.start()
Beta Was this translation helpful? Give feedback.
All reactions
-
👍 1
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment