Code: Select all

```
[Rainmeter]
Update=40
MiddleMouseUpAction=!Refresh #CURRENTCONFIG#
DynamicWindowSize=1
[Metadata]
Author=Unight
Name=Preserveaspectratio and scalemargins get the sliding effect
Version=1.0
Information=small and interesting demo
License=Creative Commons Attribution-NonCommercial-ShareAlike 3.0 Unported
[Variables]
step=6
maxsize=191
[calc]
Measure=Calc
Formula=[calc]+#step#
DynamicVariables=1
IfAboveAction=[!SetOption "calc" "UpdateDivider" "-1" ][!SetOption "calc" "Formula" "#maxsize#"]
IfAboveValue=(#maxsize#-#step#)
[calcsin]
Measure=Calc
Formula=abs(sin(90/#maxsize#*[calc]*pi/180))*#maxsize#
DynamicVariables=1
[slideshow]
meter=image
imagename=demo.png
Preserveaspectratio=0
w=([calcsin])
h=377
x=1200
DynamicVariables=1
Scalemargins=0,0,[calcsin],0
```