SilverAzide wrote: ↑June 24th, 2020, 1:49 pm
Nice addition! I keep thinking Rainmeter is
THIS CLOSE to being able to have skins that auto-arrange themselves the way that the old Windows Sidebar Gadgets would do. If you cast your mind back to those ancient bygone days, plopping a gadget into the sidebar would cause any other gadgets to auto-adjust their spacing so none would overlap. I can't quite get a handle on how we could do that in Rainmeter (I mean in a skin/Lua, not in something built into Rainmeter itself -- which could be nice). ...I guess you'd need a way to enumerate all active skins. Once you had that, you could use Lua to cycle through them looking for overlaps and use these new bangs to move them.
You don't need Lua, and you wouldn't necessarily need to do that for all active skins, just the ones in your group. What you need, since popping them using the mouse is inoperable due to Rainmeter not being able to detect when mouse has been released from a drag operation (unless you can find some plugins helping you with that), is:
- the number of rows and columns in the arranged skin matrix
- the width and height of a skin in the set (them having the same dimensions is a fair assumption in this case)
- the skin order in the set (this can be a comma separated list obtained from an input text or a checkbox list, that you can manipulate further in order to extract the individual skin names)
One requirement of the first two (but not both) can be set using some screen area based formula, and can even take the known or unknown gap between skins into account, if needed.
Then, from another skin (e.g. a settings one) you would compute the top left coordinates of each skin using a div and mod formula based on the above requirements / variables, and move them accordingly.
I'm on mobile now so I can't enter into details on this one, but is definitely possible. I'm doing just that in a test skin where I merge all the skins in my suite, and the difference between doing this within a single skin and doing it for multiple separated skins is not that significant.