death.crafter wrote: ↑July 22nd, 2021, 11:57 am
So, I figured out how to solve the problem horizontally, but I can't do so vertically. Can you help me a little out here?
I could have done it if the height of the container were not to be 0 from the beggining. Since I use a formula for the container's height, when I access it on OnRefreshAction, it ends up being 0. I just can't think of another way of getting it from the beggining.
Though I quoted Yincognito, anyone's help is appreciated.
Thanks in advance.
I didn't look into your setup in detail yet, but what I can tell is that I had a somewhat similar system of using formulas for the "child skin" (I suppose this is more or less your container, right?) size in my custom tooltip approach, and although I did this exclusively through native Rainmeter, there are a couple of things I did - maybe they can give you an idea regarding solving this:
- I used small !Delay-s to give time to Rainmeter to provide the needed info or do its thing (I'm just mentioning this, mostly it's not needed)
- I used skin-to-skin !SetVariables (didn't use !WriteKeyValue-s at all, btw, much faster using memory than disk) to "communicate" info between skins
- I first updated the meters of the child skin from the parent skin, did a redraw, and only then updated the measure (in my case) that handled the child skin movement (using parent skin specific positioning); I didn't use OnRefreshAction to move the child skin, but a measure, given the dynamic variables and the easiness of controlling it (otherwise the option is theoretically ok, since it runs after the 1st skin update anyway)
- I used an additional variable (1 or 0) passed from the parent skin to the child one to make sure the movement measure from the child skin moved that skin ONLY after it received the "ok" from the variable, meaning the meters from the child skin corrected that skin's position and size accordingly
- in the movement measure, I performed the above variable check in an IfCondition, and moved the skin in the IfTrueAction(s)
In principle, assuming there isn't any other "issue" affecting this, it's about the order of the operations: strict control of that makes sure you first draw the child skin normally, i.e. in its "unmoved" position (easier if that skin is by default hidden, by the way, so you don't see it shifting when displaying it), get the correct info about its position / dimensions, and the last thing you do is to move it in the "final" position.
That being said, it would help if you could pinpoint exactly the key parts that you have a problem with, so I don't have to look for the needle in the haystack in a code I'm not (yet) familiar with.
P.S. Sorry for the delay, been doing other "mystery solving" stuff before, LOL. One step at a time for me, it's clearer that way...