Quantcast
Channel: Rainmeter Forums
Viewing all articles
Browse latest Browse all 326

Meters Auto-Adjust to container's height (?)

$
0
0
Hey, I've been trying to come up with a solution but I think I'm over-burned cause I can't think of anything lol, so maybe someone can help.

The idea is to Auto Adjust meters to the height of their container.

Example:

Code:

[Rainmeter]Update=-1AccurateText=1[Text]Container=ContainerFontColor=255,255,255FontSize=12StringAlign=CenterX=([Container:W]/2)Y=([Container:H]/[#NumberOfMeters])r[Variables]NumberOfMeters=20FGW=400FGH=500[Background]Meter=ImageSolidColor=0,0,0W=500H=600[Foreground]Meter=ImageSolidColor=10,10,10W=[#FGW]H=[#FGH]Y=50X=([Background:W]-[Container:W])/2DynamicVariables=1[Container]Meter=ImageSolidColor=10,10,10W=[Foreground:W]H=[Foreground:H]Y=50X=([Background:W]-[Container:W])/2DynamicVariables=1[Text1]Meter=StringMeterStyle=TextText=THIS IS A TEST STRING.Y=r[Text2]Meter=StringMeterStyle=TextText=THIS IS A TEST STRING.[Text3]Meter=StringMeterStyle=TextText=THIS IS A TEST STRING.[Text4]Meter=StringMeterStyle=TextText=THIS IS A TEST STRING.[Text5]Meter=StringMeterStyle=TextText=THIS IS A TEST STRING.[Text6]Meter=StringMeterStyle=TextText=THIS IS A TEST STRING.[Text7]Meter=StringMeterStyle=TextText=THIS IS A TEST STRING.[Text8]Meter=StringMeterStyle=TextText=THIS IS A TEST STRING.[Text9]Meter=StringMeterStyle=TextText=THIS IS A TEST STRING.[Text10]Meter=StringMeterStyle=TextText=THIS IS A TEST STRING.[Text11]Meter=StringMeterStyle=TextText=This is a test string.[Text12]Meter=StringMeterStyle=TextText=This is a test string.[Text13]Meter=StringMeterStyle=TextText=This is a test string.[Text14]Meter=StringMeterStyle=TextText=This is a test string.[Text15]Meter=StringMeterStyle=TextText=This is a test string.[Text16]Meter=StringMeterStyle=TextText=This is a test string.[Text17]Meter=StringMeterStyle=TextText=This is a test string.[Text18]Meter=StringMeterStyle=TextText=This is a test string.[Text19]Meter=StringMeterStyle=TextText=This is a test string.[Text20]Meter=StringMeterStyle=TextText=This is a test string.
Sorry for the lazy example. The idea is to make all the strings to be equally spaced, the first string should be at the top of the container (where it is on the example) and the last string should be at the bottom of the container. All strings between them should be equially spaced. The solution should make it so that when there's more or less strings, the outcome is always the same, the first at the top, the last at the bottom, and the strings in between equally spaced.

The idea is basically to do what Y=R on all meters does, but considering the Containers Height for the spacing. In the example all meters have the same size, but the soulution should work even if meters are of different sizes, and types, like meters and shapes for example. The closest I have gotten is Y=([Container:H]/[#NumberOfMeters])r but it's not perfect.

You can play with the FGH variable to see what I mean.

Any ideas?

PS. I edited and changed the code a little.

Statistics: Posted by RicardoTM — Yesterday, 3:46 pm — Replies 16 — Views 228



Viewing all articles
Browse latest Browse all 326

Trending Articles