From 41156cd1092a7fb6501dcbbfaffe5df34186a6cd Mon Sep 17 00:00:00 2001 From: nstechbytes Date: Wed, 26 Nov 2025 18:47:27 +0500 Subject: [PATCH 1/4] add BangCommand demo skin for WebView2. --- Resources/Skins/WebView2/BangCommand/BangCommand.ini | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/Resources/Skins/WebView2/BangCommand/BangCommand.ini b/Resources/Skins/WebView2/BangCommand/BangCommand.ini index 2d6f61b..64aae4a 100644 --- a/Resources/Skins/WebView2/BangCommand/BangCommand.ini +++ b/Resources/Skins/WebView2/BangCommand/BangCommand.ini @@ -27,7 +27,7 @@ Y=25 ; ======================================== [MeterBackground] Meter=Shape -Shape=Rectangle 0,0,950,400 | FillColor 0,0,0,1 | StrokeWidth 0 +Shape=Rectangle 0,0,950,400,12 | FillColor 0,0,0,100 | StrokeWidth 0 [Title] Meter=String @@ -36,7 +36,7 @@ FontSize=16 FontColor=255,255,255,255 AntiAlias=1 X=25 -Y=5 +Y=10 [StyleButtonText] FontColor=255,255,255,255 From cd480a3522088998d8b51bc57456469ec4fab98a Mon Sep 17 00:00:00 2001 From: nstechbytes Date: Wed, 26 Nov 2025 19:57:07 +0500 Subject: [PATCH 2/4] Implement WebView2 Rainmeter plugin with dynamic property updates, updated documentation, and a new sample skin. --- README.md | 16 +- .../WebView2/BangCommand/BangCommand.ini | 86 +++++--- WebView2/Plugin.cpp | 189 ++++++------------ 3 files changed, 131 insertions(+), 160 deletions(-) diff --git a/README.md b/README.md index b3a48b3..17b6b99 100644 --- a/README.md +++ b/README.md @@ -64,8 +64,16 @@ Height=600 | `X` | X position offset in pixels | 0 | No | | `Y` | Y position offset in pixels | 0 | No | | `Hidden` | Hide the WebView on load (0 = visible, 1 = hidden) | 0 | No | +| `DynamicVariables` | Enable dynamic variable updates (0 or 1) | 0 | No | + +**Notes**: +- Transparent background is always enabled by default. Developer tools (F12) are always available. +- When `DynamicVariables=1`, the plugin intelligently handles updates: + - **URL changes**: Navigates to the new URL without recreating the WebView + - **Dimension/Position changes** (`W`, `H`, `X`, `Y`): Applied instantly without flickering + - **Visibility changes** (`Hidden`): Applied instantly + - The WebView is only created once on first load, preventing flickering issues -**Note**: Transparent background is always enabled by default. Developer tools (F12) are always available. ### Bang Commands @@ -77,13 +85,7 @@ Execute commands from your skin using `[!CommandMeasure MeasureName "Command"]`: | `Reload` | Reload the current page | `[!CommandMeasure MeasureWebView "Reload"]` | | `GoBack` | Navigate to the previous page in history | `[!CommandMeasure MeasureWebView "GoBack"]` | | `GoForward` | Navigate to the next page in history | `[!CommandMeasure MeasureWebView "GoForward"]` | -| `Show` | Make the WebView visible | `[!CommandMeasure MeasureWebView "Show"]` | -| `Hide` | Hide the WebView | `[!CommandMeasure MeasureWebView "Hide"]` | | `ExecuteScript