Hello!
So currently all the skins "anchor" at the top-left corner, meaning that coordinate (0,0) is at the top-left corner and skins grow to the right.
It would be nice if there was a mode for the skins to "anchor" at the top-right corner, meaning that coordinate (0,0) is at the top-right corner. Example, an object at (150,0) from this top-right anchoring would be offset 150 pixels from the right (= with the current implementation, it would be like (-150,0) but that isn't possible).
I wrote something related to this years ago but I've never gotten around to sharing it here. It would be great if skins can expand to the left since it would make right aligned skins easier to make.
What do you guys think?
It is currently April 20th, 2024, 9:43 am
[Suggestion] Anchoring skin from the top-right
-
- Posts: 30
- Joined: October 24th, 2013, 8:15 am
[Suggestion] Anchoring skin from the top-right
Last edited by redsaph on July 30th, 2019, 2:21 pm, edited 1 time in total.
Rainmeter-er since 2013 | My DeviantART
-
- Rainmeter Sage
- Posts: 16148
- Joined: October 11th, 2010, 6:27 pm
- Location: Gheorgheni, Romania
Re: [Suggestion] Anchoring skin from the top-right
But there is a such option. You have to edit the Rainmeter.ini file (available through a right click to the Rainmeter icon, then click Edit settings). See this description: https://docs.rainmeter.net/manual/settings/skin-sections/#AnchorXY
-
- Posts: 30
- Joined: October 24th, 2013, 8:15 am
Re: [Suggestion] Anchoring skin from the top-right
That's for positioning the skin in relation to the monitor/window. What I was looking for is positioning the meters inside a skin such that the origin (0,0) begins at the top-right corner of the skin.balala wrote: ↑July 29th, 2019, 5:40 pm But there is a such option. You have to edit the Rainmeter.ini file (available through a right click to the Rainmeter icon, then click Edit settings). See this description: https://docs.rainmeter.net/manual/settings/skin-sections/#AnchorXY
The current implementation for the skin's positioning is like on quadrant 4 (but instead of negative y-values when going downwards, it's all positive).
My suggestion was to have an option to set a property inside the [Rainmeter] section of a skin that would allow it to have meters positioned like in quadrant 3 (but probably in absolute values).
Rainmeter-er since 2013 | My DeviantART
-
- Rainmeter Sage
- Posts: 16148
- Joined: October 11th, 2010, 6:27 pm
- Location: Gheorgheni, Romania
Re: [Suggestion] Anchoring skin from the top-right
Sorry I misunderstood you. No approach for this.redsaph wrote: ↑July 29th, 2019, 6:12 pm That's for positioning the skin in relation to the monitor/window. What I was looking for is positioning the meters inside a skin such that the origin (0,0) begins at the top-right corner of the skin.
The current implementation for the skin's positioning is like on quadrant 4 (but instead of negative y-values when going downwards, it's all positive).
My suggestion was to have an option to set a property inside the [Rainmeter] section of a skin that would allow it to have meters positioned like in quadrant 3 (but probably in absolute values).
-
- Posts: 14
- Joined: April 27th, 2018, 10:52 pm
Re: [Suggestion] Anchoring skin from the top-right
Using DynamicWindowSize=1 and a skin that continuously grows in length, setting AnchorX to 100% actually does anchor the skin on the top right. The skin is growing to the left instead of to the right.
-
- Posts: 30
- Joined: October 24th, 2013, 8:15 am
Re: [Suggestion] Anchoring skin from the top-right
How can I set AnchorX to 100% on my skin by default (without editing Rainmeter.ini)? Do you have a sample that I can take a look at?
Rainmeter-er since 2013 | My DeviantART
-
- Posts: 14
- Joined: April 27th, 2018, 10:52 pm
Re: [Suggestion] Anchoring skin from the top-right
You could probably write to Rainmeter.ini using !WriteKeyValue, but I'm not sure how good of an idea that is.
Edit Rainmeter.ini and add AnchorX=100% under the skin and it should work.
Edit Rainmeter.ini and add AnchorX=100% under the skin and it should work.
Code: Select all
[Rainmeter]
Update=32
DynamicWindowSize=1
[MeasureCalc]
Measure=Calc
Formula=MeasureCalc+1
[MeterShape]
Meter=Shape
Shape=Rectangle 0,0,([MeasureCalc]),50
DynamicVariables=1
-
- Rainmeter Sage
- Posts: 5398
- Joined: April 12th, 2012, 9:40 pm
- Location: Cedar Point, Ohio, USA
Re: [Suggestion] Anchoring skin from the top-right
Demonstrating Axinoe's suggestion to set the skin AnchorX @ 100%. Using RunOnce (JSMorley's idea!) it is a simple solution.
Code: Select all
[Rainmeter]
Update=32
DynamicWindowSize=1
[RunOnce]
Measure=Calc
Formula=Counter
IfEqualValue=1
IfEqualAction=[!WriteKeyValue #CurrentConfig# AnchorX 100% "#SettingsPath#Rainmeter.ini"][!Refresh]
IfAboveValue=1
IfAboveAction=[!DisableMeasure RunOnce]
[MeasureLoop]
Measure=Loop
StartValue=0
EndValue=200
LoopCount=0
; PingPong
IfCondition=MeasureLoop=200
IfTrueAction=[!SetOption MeasureLoop InVertMeasure 1][!UpdateMeasure MeasureLoop]
IfCondition2=MeasureLoop=0
IfTrueAction2=[!SetOption MeasureLoop InVertMeasure 0][!UpdateMeasure MeasureLoop]
[MeterShape]
Meter=Shape
Shape=Rectangle 0,0,(50+[MeasureLoop]),(50+[MeasureLoop]),10 | Fill Color (55+[MeasureLoop]),(140-([MeasureLoop]*0.5)),(255-([MeasureLoop]*0.5))
DynamicVariables=1
You do not have the required permissions to view the files attached to this post.
:: My DA Gallery :: Rainmeter DA Gallery :: Rainmeter Workshops :: Rainmeter Documentation :: BBCode Guide ::
-
- Rainmeter Sage
- Posts: 5398
- Joined: April 12th, 2012, 9:40 pm
- Location: Cedar Point, Ohio, USA
Re: [Suggestion] Anchoring skin from the top-right
Here is an example using string meters.
Click to animate...
Code: Select all
[Rainmeter]
Update=1000
DynamicWindowSize=1
BackgroundMode=2
SolidColor=255,255,255,100
[RunOnce]
Measure=Calc
Formula=Counter
IfEqualValue=1
IfEqualAction=[!WriteKeyValue #CurrentConfig# AnchorX 100% "#SettingsPath#Rainmeter.ini"][!Refresh]
IfAboveValue=1
IfAboveAction=[!DisableMeasure RunOnce]
[MeterString]
Meter=String
Text=Right-anchored skin in a dynamically resized window, based on the length of the text.
FontWeight=500
FontColor=0,0,0
FontSize=12
DynamicVariables=1
; Documentation: https://docs.rainmeter.net/manual-beta/meters/string/
[String1]
Meter=String
X=r
Y=R
Text=- STRING 1 -
LeftMouseUpAction=[!SetOption MeterString Text "Right-anchored skin in a dynamically resized window, based on the length of the text."][!UpdateMeter MeterString][!Redraw]
[String2]
Meter=String
X=r
Y=R
Text=- STRING 2 -
LeftMouseUpAction=[!SetOption MeterString Text "Right-anchored skin with short text."][!UpdateMeter MeterString][!Redraw]
You do not have the required permissions to view the files attached to this post.
:: My DA Gallery :: Rainmeter DA Gallery :: Rainmeter Workshops :: Rainmeter Documentation :: BBCode Guide ::
-
- Posts: 30
- Joined: October 24th, 2013, 8:15 am
Re: [Suggestion] Anchoring skin from the top-right
Thank you everyone, this looks exactly what I was looking for!
Rainmeter-er since 2013 | My DeviantART