It is currently March 28th, 2024, 7:01 pm

Placing a skin in the center of screen

Get help with creating, editing & fixing problems with skins
User avatar
David8192
Posts: 246
Joined: July 8th, 2021, 11:30 pm
Location: The King's Avenue, Golden Kingdom

Re: Placing a skin in the center of screen

Post by David8192 »

CodeCode wrote: December 12th, 2021, 2:05 pm This might help: https://docs.rainmeter.net/manual/bangs/#SetWindowPosition

Code: Select all

[Raonmeter]
Update=1000
OnRefreshAction=[!SetWindowPosition "50%" "50%" "0%" "0%"]
Sorry for my intrusion. I just noticed a typo, that's all.
[Raonmeter]
:Whistle
the DA GALLERY 8-) For some Reason, the square root of X2 does not involve X
User avatar
CodeCode
Posts: 1363
Joined: September 7th, 2020, 2:24 pm
Location: QLD, Australia

Re: Placing a skin in the center of screen

Post by CodeCode »

balala wrote: December 12th, 2021, 7:21 pm In fact with this OnRefreshAction the skin isn't placed exactly to the center of screen. This way the upper left corner of the skin will be in the center of screen. To move it in center, replace the last two parameters of 0% (AnchorX and AnchorY) with 50%: OnRefreshAction=[!SetWindowPosition "50%" "50%" "50%" "50%"]. This way you get the center of skin in the center of screen.
Of course. The offset. Neglected to recall that properly.

This way does not require the skin to be really big, and will only reposition after a !Refresh is called or when the skin initially loads.
:bow:
ƈǟռ'ȶ ʄɨӼ ɨȶ ɨʄ ɨȶ ǟɨռ'ȶ ɮʀօӄɛ - ʊռʟɛֆֆ ɨȶ ɨֆ ɨռ ƈօɖɛ.