Hi Rainmeter Savages!
Need your brain power once more.
Have a nice VU meter.
Whole skin is scaling nicely on mouse scroll, but there are some problems with the needle and LED - they don't scale properly.
Please take a look at the skin code and help me solve the issue.
Any other/alternative refinements are as always welcome!
Many thx in advance!
Dany Gee wrote: ↑July 29th, 2022, 8:13 pm
Whole skin is scaling nicely on mouse scroll, but there are some problems with the needle and LED - they don't scale properly.
Please take a look at the skin code and help me solve the issue.
Any other/alternative refinements are as always welcome!
In fact the needle doesn't scale at all, because it's a little bit more complicated to scale a Rotator meters. But not impossible. You have to apply a proper TransformationMatrix. For instance the following one: TransformationMatrix=#Scale#;0;0;#Scale#;([#CURRENTSECTION#:X]*(1-#Scale#));([#CURRENTSECTION#:Y]*(1-#Scale#)).
Additional recommendation: it's extremely unfortunate to refresh the skin so frequently when you're scrolling as you do. The refresh is always a not desirable action, which in most cases can and has to be avoided. In this case it is not needed at all. Better is to dynamically set the size of the skin. For this you have to add some features:
Since the [Rainmeter] section doesn't support dynamic variables, but to dynamically can resize the skin you should have to use them, you have to convert the !SetVariable and !WriteKeyValue bangs of the [Rainmeter] section to use the changing #Scale# variable as a nesting variable ([#Scale]). In this form the [Rainmeter] section is supporting the dynamically changing variables.
You have to add a DynamicVariables=1 option to all meters which are using the #Scale# variable (to can get them following the dynamically changing variable). So add this option to all meters ([MeterBackground], [MeterAudioRMSL] and [MeterLEDPeak]).
Finally remove the [!Refresh] bang from the MouseScrollUpAction and MouseScrollDownAction options and add bangs to update all abave mentioned meters and another to redraw the skin.
There is extremely hard to scroll, because Rainmeter ignores when you1re scrolling over transparent parts of the skin. To avoid this you should have to create a not visible background, which would react to mouse scrolling. This can easily ba done by adding the BackgroundMode=2 and the SolidColor=0,0,0,1 options to the [Rainmeter] section.
With all these modifications your code should look this way: