It is currently February 29th, 2024, 3:32 pm

[QUESTION] Rainmeter code

Report bugs with the Rainmeter application and suggest features.
User avatar
Rainmeter Sage
Posts: 6829
Joined: February 27th, 2015, 2:38 pm
Location: Terra Yincognita

Re: [QUESTION] Rainmeter code

Post by Yincognito »

Brian wrote: July 2nd, 2023, 6:00 am 1) I think if it can be done without too much difficulty, then go for it.
On paper this looks simple, but I'll have to see if that translates in practice. :sly:
Brian wrote: July 2nd, 2023, 6:00 am 2) Like an action option to be used with bangs just before redrawing?
Brian wrote: July 2nd, 2023, 6:00 am 3) This option might be a lot of extra work and special syntax that could be done more consistently via a meter.
Indeed, this could be complex and tricky, I included it to cover all angles.
Brian wrote: July 2nd, 2023, 6:00 am But then again, I get amazed all the time at what people can think of.
Well, it would be useful to compute the skin size (excluding the background meter) to adjust the size of that meter in Lua.
But yeah, I'm one of those that likes to go "where no one else has gone before", so to speak. :lol:


The root of the issue here is that a background meter is the first in a skin, but at that time the size of the skin is only available internally in the non-dynamic [Rainmeter] section, and it includes the background meter size (which complicates adjusting that size, as it requires unaccounting it by toggling the meter and multiple skin redrawing). The variants above look for a way to "insert" getting the contents meters' cummulative size so it can be used to adjust the background meter's size before redrawing the skin.

For now I must have a working bevel as a shape meter in plain ini code, so that I can verify whatever I might do in C++ against it. I thought I've done it via the last code I posted here, but it only works correctly for square rectangles because of the 45±180 degree gradient - I have another approach in the making where the top right and bottom left corners are separated squares from the rest of the paths and the gradient works fine, but as you said, joining those things without combining shapes for fractional bevel widths is a challenge (might need some rounding up and down in various places).

P.S. 4) another variant would be to have a Background=... option similar to the Container=... one in a meter, that allows getting the internally available cummulative size of the other meters as, say, $CURRENTCONFIGWIDTH$ and $CURRENTCONFIGHEIGHT$ and use it to set the said meter's dimensions. Just brainstorming here, of course...
Profiles: Rainmeter ProfileDeviantArt ProfileSuites: MYiniMeterSkins: Earth