It is currently December 7th, 2019, 8:45 pm

[Suggestion] Default Skin Positions Without Using Layouts

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

[Suggestion] Default Skin Positions Without Using Layouts

SilverAzide » November 30th, 2018, 9:58 pm

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!
DeviantArt Gadgets More...
User avatar
jsmorley
Developer
Posts: 19850
Joined: April 19th, 2009, 11:02 pm
Location: Fort Hunt, Virginia, USA

Re: [Suggestion] Default Skin Positions Without Using Layouts

jsmorley » November 30th, 2018, 10:25 pm

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

Re: [Suggestion] Default Skin Positions Without Using Layouts

SilverAzide » 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.
DeviantArt Gadgets More...
User avatar
Yamajac
Posts: 117
Joined: June 30th, 2014, 8:44 am

Re: [Suggestion] Default Skin Positions Without Using Layouts

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

Code: Select all

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

Re: [Suggestion] Default Skin Positions Without Using Layouts

Brian » November 15th, 2019, 12:55 am

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: 117
Joined: June 30th, 2014, 8:44 am

Re: [Suggestion] Default Skin Positions Without Using Layouts

Yamajac » November 15th, 2019, 1:20 am

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: 19850
Joined: April 19th, 2009, 11:02 pm
Location: Fort Hunt, Virginia, USA

Re: [Suggestion] Default Skin Positions Without Using Layouts

jsmorley » November 15th, 2019, 1:32 am

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: 117
Joined: June 30th, 2014, 8:44 am

Re: [Suggestion] Default Skin Positions Without Using Layouts

Yamajac » November 15th, 2019, 1:38 am

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
Posts: 615
Joined: March 23rd, 2015, 5:26 pm

Re: [Suggestion] Default Skin Positions Without Using Layouts

SilverAzide » November 15th, 2019, 10:53 pm

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

Re: [Suggestion] Default Skin Positions Without Using Layouts

balala » November 16th, 2019, 7:22 am

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.