It is currently March 29th, 2024, 10:59 am

[Suggestion] Default Skin Positions Without Using Layouts

Report bugs with the Rainmeter application and suggest features.
User avatar
SilverAzide
Rainmeter Sage
Posts: 2588
Joined: March 23rd, 2015, 5:26 pm

[Suggestion] Default Skin Positions Without Using Layouts

Post by SilverAzide »

Hello, a suggestion for an enhancement....

Currently, when installing a new .rmskin package, if you want the skins to start up in a specific location/z-order/etc., the only way to do this is to either use a layout or to add a bunch of code in the skin itself to position the skin automatically. The problem with these options is that if I load someone's layout, it will blow away MY current layout. If I choose to ignore the layout included with the skin pack, then all the skins will show up at 0,0 unless there is positioning code in the skin.

So, how about a way for a skin author to add some default positioning info directly in the skin? This would ONLY be used the very first time the skin is loaded. Once the skin is loaded and the user has made any changes, the user's preferences would be used. In other words, the default positioning settings would only be used as the initial values the first time Raimmeter adds a skin to Rainmeter.ini.

These new positioning settings would essentially be all the ones currently stored in a layout (WindowX/Y, AnchorX/Y, AlwaysOnTop, Draggable, etc.). As a suggestion, these defaults could be placed in the [Rainmeter] section of the skin, like so:

Code: Select all

[Rainmeter]
AccurateText=1
Update=1000
DefaultWindowX=50%
DefaultWindowY=50%
DefaultAlwaysOnTop=-2
; etc...
My apologies if this capability already exists!
Gadgets Wiki GitHub More Gadgets...
User avatar
jsmorley
Developer
Posts: 22628
Joined: April 19th, 2009, 11:02 pm
Location: Fort Hunt, Virginia, USA

Re: [Suggestion] Default Skin Positions Without Using Layouts

Post by jsmorley »

Not opposed to this in theory. We will put it on the radar...
User avatar
SilverAzide
Rainmeter Sage
Posts: 2588
Joined: March 23rd, 2015, 5:26 pm

Re: [Suggestion] Default Skin Positions Without Using Layouts

Post by SilverAzide »

With the advent of new 4.4.x betas, I'd like to bump this feature request... Apologies to the devs if I'm being too annoying.
Gadgets Wiki GitHub More Gadgets...
User avatar
Yamajac
Posts: 134
Joined: June 30th, 2014, 8:44 am

Re: [Suggestion] Default Skin Positions Without Using Layouts

Post by Yamajac »

Code: Select all

[rainmeter]
Update = -1
OnRefreshAction = [!Move X Y]
User avatar
Brian
Developer
Posts: 2674
Joined: November 24th, 2011, 1:42 am
Location: Utah

Re: [Suggestion] Default Skin Positions Without Using Layouts

Post by Brian »

Yamajac wrote: November 15th, 2019, 12:02 am

Code: Select all

[rainmeter]
Update = -1
OnRefreshAction = [!Move X Y]
This moves the skin everytime the skin is loaded. I believe the intent of the suggestion is just to load the skin with some default positioning on the very first time the skin was ever loaded (without the need of a layout). Then if the user moves the skin, Rainmeter would retain any positioning that the user had done.


SilverAzide wrote: November 14th, 2019, 11:32 pm With the advent of new 4.4.x betas, I'd like to bump this feature request... Apologies to the devs if I'm being too annoying.
Not annoying at all. This feels like a good feature. It's a little tricky to implement since it boils down to a "chicken before the egg" issue... so hopefully there is a solution to it.

-Brian
User avatar
Yamajac
Posts: 134
Joined: June 30th, 2014, 8:44 am

Re: [Suggestion] Default Skin Positions Without Using Layouts

Post by Yamajac »

Brian wrote: November 15th, 2019, 12:55 am This moves the skin everytime the skin is loaded. I believe the intent of the suggestion is just to load the skin with some default positioning on the very first time the skin was ever loaded (without the need of a layout). Then if the user moves the skin, Rainmeter would retain any positioning that the user had done.
-Brian

Ahh.

Code: Select all

[Rainmeter]
Update = -1

[Defaults]
Measure = Calc
OnUpdateAction = [!WriteKeyValue Defaults Disabled 1][!Move 500 120]


[drawsomething]
Meter = Shape
Shape = Rectangle 0, 0, 50, 50 | Fill Color 255,0,0,255 | StrokeWidth 0


User avatar
jsmorley
Developer
Posts: 22628
Joined: April 19th, 2009, 11:02 pm
Location: Fort Hunt, Virginia, USA

Re: [Suggestion] Default Skin Positions Without Using Layouts

Post by jsmorley »

Yamajac wrote: November 15th, 2019, 1:20 am Ahh.

Code: Select all

[Rainmeter]
Update = -1

[Defaults]
Measure = Calc
OnUpdateAction = [!WriteKeyValue Defaults Disabled 1][!Move 500 120]


[drawsomething]
Meter = Shape
Shape = Rectangle 0, 0, 50, 50 | Fill Color 255,0,0,255 | StrokeWidth 0


To be honest, a Rube Goldberg machine is just not always the desired solution. We kinda like things to be intuitive when possible. We are chewing on this...
User avatar
Yamajac
Posts: 134
Joined: June 30th, 2014, 8:44 am

Re: [Suggestion] Default Skin Positions Without Using Layouts

Post by Yamajac »

jsmorley wrote: November 15th, 2019, 1:32 am To be honest, a Rube Goldberg machine is just not always the desired solution. We kinda like things to be intuitive when possible. We are chewing on this...
Yea, this would definitely be something that's nice to have. Just providing a solution that works now.
User avatar
SilverAzide
Rainmeter Sage
Posts: 2588
Joined: March 23rd, 2015, 5:26 pm

Re: [Suggestion] Default Skin Positions Without Using Layouts

Post by SilverAzide »

Thanks for the consideration guys! Yes, avoiding the Rube Goldberg approach is the goal here... :thumbup:
Gadgets Wiki GitHub More Gadgets...
User avatar
balala
Rainmeter Sage
Posts: 16110
Joined: October 11th, 2010, 6:27 pm
Location: Gheorgheni, Romania

Re: [Suggestion] Default Skin Positions Without Using Layouts

Post by balala »

Brian wrote: November 15th, 2019, 12:55 am This moves the skin everytime the skin is loaded. I believe the intent of the suggestion is just to load the skin with some default positioning on the very first time the skin was ever loaded (without the need of a layout). Then if the user moves the skin, Rainmeter would retain any positioning that the user had done.
Yes, but this can be handled adding a !WriteKeyValue bang beside the !Move. Something like: OnRefreshAction=[!Move "X" "Y"][!WriteKeyValue Rainmeter OnRefreshAction "[]"]. With such an option, the skin is positioned only once, when first time loaded, later it reuses its previous position.