It is currently March 28th, 2024, 9:42 pm

Container and section-variables of meters inside

Report bugs with the Rainmeter application and suggest features.
User avatar
ikarus1969
Posts: 571
Joined: February 28th, 2011, 3:20 pm
Location: Vienna, Austria

Container and section-variables of meters inside

Post by ikarus1969 »

Just one question: meters with the container-option are positioned relative to the container.
When i access the position of a meter inside of a acontainer with section-variables (in that case the y-position, but i think that doesn't matter) i still get the position relative to the skin and not relative to the container (what i would have expected before my test).

is this the intended behavior?
User avatar
jsmorley
Developer
Posts: 22628
Joined: April 19th, 2009, 11:02 pm
Location: Fort Hunt, Virginia, USA

Re: Container and section-variables of meters inside

Post by jsmorley »

ikarus1969 wrote: December 10th, 2018, 4:21 pm Just one question: meters with the container-option are positioned relative to the container.
When i access the position of a meter inside of a acontainer with section-variables (in that case the y-position, but i think that doesn't matter) i still get the position relative to the skin and not relative to the container (what i would have expected before my test).

is this the intended behavior?

I think "intended" might be too strong a word, but yes. The relative positioning is done by simply making the first content meter relative to the container by using an implied Y=r. That will, as it does with any meter, even before Container was an idea, make the meter draw relative to the starting Y of the container meter, but it doesn't change the absolute Y position of the meter in the skin. Same is of course true with X. The numeric values of X and Y are always relative to the skin. Container doesn't change that.

You would have to do some simple math based on the Y of the container meter, subtracting that from the Y of the content meter.


The first "content" meter defined in the container meter will automatically be relative to the starting X and Y (think "r") of the container meter, No "r" relative positioning modifier is needed. It is redundant and ignored. Y=10 has the effect of Y=10r.

All subsequent "content" meters in the same container should use the "R" or "r" relative positioning modifiers, which will be relative to the immediately preceding content meter. If no "R" or "r" is used on any content meter, it will still automatically be relative to the container meter.

Any subsequent meters that are not "content", that don't have the Container option, when using the "R" or "r" relative positioning modifiers, will be relative to the immediately preceding meter that also is NOT "content".
User avatar
ikarus1969
Posts: 571
Joined: February 28th, 2011, 3:20 pm
Location: Vienna, Austria

Re: Container and section-variables of meters inside

Post by ikarus1969 »

i startet to quote the - for me - most important parts of your post, then, quickly gave up, because the whole post is important for my understanding (i like the expression "to wrap my head around") of the container-meter and its subsequent meters.

Thank you - again - for explaining! :bow:
User avatar
jsmorley
Developer
Posts: 22628
Joined: April 19th, 2009, 11:02 pm
Location: Fort Hunt, Virginia, USA

Re: Container and section-variables of meters inside

Post by jsmorley »

ikarus1969 wrote: December 11th, 2018, 6:52 am i startet to quote the - for me - most important parts of your post, then, quickly gave up, because the whole post is important for my understanding (i like the expression "to wrap my head around") of the container-meter and its subsequent meters.

Thank you - again - for explaining! :bow:
Glad to help.

I absolutely love this Container functionality. The thing I like best about it is that it is a beautifully simple idea that has tons of power for creativity. All the power is contained in three simple rules:

1) Content meters are drawn relative to the starting X and Y of the container meter.
2) The "content" is constrained by the W and H of the container meter. It will be truncated when outside the container.
3) The "content" is only drawn on "solid" pixels of the container meter.

That's it. Those three simple rules gives you the ability to slide things in and out of view, to move an entire group of meters by simply moving the container, and to mask any meter into the shape of any other meter.
User avatar
ikarus1969
Posts: 571
Joined: February 28th, 2011, 3:20 pm
Location: Vienna, Austria

Re: Container and section-variables of meters inside

Post by ikarus1969 »

and i like as a personal 4. point: if you use an alpha-component gradient on the containers SolidColor, then you can make the container-content "vanishing" in that area (invisble from above the text "ICS/Redmine" to opaque on top of this part of a screenshot) :
Screenshot RM.jpg
You do not have the required permissions to view the files attached to this post.