Open khanhas opened 2 years ago
Hi @@brianferguson, I keep my WebView meter development in this repo. If you have any comment or suggestion, please leave them in this Issue or make a new one.
I attach here Rainmeter executable (on https://github.com/rainmeter/rainmeter/commit/6b54b5ffa23fc28694b5a6e2210cb27341d0488c) compiled with WebView meter. Example skins folder is also included, please copy it to your Document\Rainmeter\Skins
folder.
Remember to remove plugin WebView.dll if you had it.
I think this a great first draft showing WVM as a meter instead of a plugin. Good work!
It looks like you covered all the issues I could see already, so hopefully with some luck we can figure this out. IMO, the main issues are:
[Rainmeter]
Update=-1
[mes] Meter=WebView URL=index.html Y=10 X=10 W=400 H=700 SolidColor=0,0,0,1
[Test] Meter=Image W=100 H=100 SolidColor=255,0,0 LeftMouseUpAction=[!ToggleMeter mes][!UpdateMeter mes][!Redraw]
I am most concerned about item 1, 2 and 4. I feel like for item 3, we could just document the behavior if we can't find a solution.
I am not concerned with the Container option for this particular meter, since they do use different rendering systems. Maybe @TheAzack9 would have some thoughts on that if it is possible.
-Brian
I drafted second release with all Mouse Actions supported including drag.
I tried to match all mouse actions functionalities, and dragging is probably the most annoying thing to perfect. Please test it thoroughly and see if I missed anything.
If a web element want to be excluded from mouse actions, user just need to call event.stopPropagation()
in mouseup
(if XXMouseUpAction is set) or mousedown
(if XXMouseDownAction is set) event handler.
There is a change on context menu action: Shift + Right click will open WebView2 context menu.
Alt + Right click causes context menu to behave weirdly and I can't really figure out why.
Rainmeter menu now can be opened via Right click (if there is no RightMouseXXAction is set) or Ctrl + Right click.
I also fixed artifact problem when toggling meter. Hide meter now also put WebView2 into resource saving mode (throttle any running timer to 1s and reduce memory usage).
WebView Meter (WVM) features set including:
Anatomy
TODO
Library.tlb
file and load it at runtimeNotes
Library.tlb
:Library.rc
%TEMP%
LoadTypeLib
that filePotential features
Freeze WVM in between Update intervals to reduce resource usage: https://github.com/MicrosoftEdge/WebView2Feedback/blob/master/specs/Freeze.mdThrottled by hiding window is good enoughUpdate
function on meter Update.document.body
size change