It is currently May 25th, 2020, 2:08 pm

[Feature Suggestion] Possibility to use modifiers in move bang

Report bugs with the Rainmeter application and suggest features.
User avatar
Nickson
Posts: 2
Joined: May 10th, 2020, 7:02 pm

[Feature Suggestion] Possibility to use modifiers in move bang

Post by Nickson »

I stumbled upon the move bang to center my skins.

In here it says, you can use the %, R, B modifiers for the WindowX and WindowY position.

But its not possible to use these modifiers in the move bang, but it would be nice when you can.

As example I use this bang to center a skin:
[!Move "(#WORKAREAWIDTH# / 2 - #CURRENTCONFIGWIDTH# / 2)" "(#WORKAREAHEIGHT# / 2 - #CURRENTCONFIGHEIGHT# / 2)" "#CURRENTCONFIG#"]

With the change it would be possible to shorten it like that:
[!Move "(50% - #CURRENTCONFIGWIDTH# / 2)" "(50% - #CURRENTCONFIGHEIGHT# / 2)" "#CURRENTCONFIG#"]
User avatar
Brian
Developer
Posts: 1994
Joined: November 24th, 2011, 1:42 am
Location: Utah

Re: [Feature Suggestion] Possibility to use modifiers in move bang

Post by Brian »

Nickson wrote:
May 14th, 2020, 3:11 am
With the change it would be possible to shorten it like that:
[!Move "(50% - #CURRENTCONFIGWIDTH# / 2)" "(50% - #CURRENTCONFIGHEIGHT# / 2)" "#CURRENTCONFIG#"]
I just want to point out that the modifiers %, R, B need to be trailing. The 50% portion of your example bang would be invalid since it not accepted currently with WindowX/Y.
https://docs.rainmeter.net/manual/settings/skin-sections/#WindowXY

Having said that, this is something we can look at. It's just a matter of parsing, and we can re-use the same parsing that we use for WindowX/Y.

We will discuss this.

-Brian

PS - Glancing at the code in question, I discovered a bug with our current parsing of WindowY, and an inconsistency with the AnchorX/Y options (they don't support the B modifier). Although that might be just a documentation issue.
User avatar
Jeff
Posts: 134
Joined: September 3rd, 2018, 11:18 am

Re: [Feature Suggestion] Possibility to use modifiers in move bang

Post by Jeff »

If this is really looked at, will a bang related to changing the anchor also be made, or will we have to do it with DefaultAnchorN?
Maybe I shouldn't have been so blunt when I made fun of !Move only using pixels here...