It is currently April 24th, 2024, 8:04 am

Skin relative to other skin?

Get help with creating, editing & fixing problems with skins
Kalamaja
Posts: 5
Joined: November 30th, 2015, 10:41 pm

Skin relative to other skin?

Post by Kalamaja »

So here's my problem. In the middle here on the right I have my date skin (01 Dets, teisipäev). On the left you can see the 3 different pieces it is made of. They all have their different X and Y setting at the moment. How I make them relative to each other and make sure they also don't move.

The main problem here is the month (atm Dets). If it changes to something shorter or longer it will either cover up the day or be too far from it. I also want to make sure that it moves on the left side (the right side stays put).
Last edited by Kalamaja on December 1st, 2015, 4:05 pm, edited 1 time in total.
Ragingwasabi
Posts: 86
Joined: March 7th, 2015, 2:23 pm

Re: Skin relative to other skin?

Post by Ragingwasabi »

it helps if u post ur skins.
User avatar
balala
Rainmeter Sage
Posts: 16164
Joined: October 11th, 2010, 6:27 pm
Location: Gheorgheni, Romania

Re: Skin relative to other skin?

Post by balala »

Not very sure if you want to position some skin relative to another or some meter of a skin, relative to another meter. I think you thought to the second possibility (the year, month and day should be pieces of the same skin). If so, you should take a look at the relative positioning of meters. For more accurate help, indeed, as Ragingwasabi wrote, you should post some code.
Kalamaja
Posts: 5
Joined: November 30th, 2015, 10:41 pm

Re: Skin relative to other skin?

Post by Kalamaja »

My bad, I meant to also post this image. And you're right, I mean the relations between the meters.

Image

Whole code for that skin:

Code: Select all

[Rainmeter]
Author=AidenDrew.deviantart.com
[Style1]
FontFace=AvantGarde BK BT
FontSize=100
FontColor=ffffff
AntiAlias=1
[Style2]
FontFace=AvantGarde BK BT
FontSize=67
FontColor=9a223b
AntiAlias=1
[Style3]
FontFace=AvantGarde BK BT
FontSize=60
FontColor=ffffff
AntiAlias=1
[MeasureDate1]
Measure=Time
Format=%d
[MeasureDate2]
Measure=Time
Format=%B
Substitute="January":"Jaan","February":"Veebr","March":"Märts","April":"Apr","May":"Mai","June":"Juuni","July":"Juuli","August":"Aug","September":"Sept","October":"Okt","November":"Nov","December":"Dets"
[MeasureDate3]
Measure=Time
Format=%A
Substitute="Monday":"esmaspäev","Tuesday":"teisipäev","Wednesday":"kolmapäev","Thursday":"neljapäev","Friday":"reede","Saturday":"laupäev","Sunday":"pühapäev"

[MeterDate1]
Meter=String
MeasureName=MeasureDate1
MeterStyle=Style2
X=10R
Y=20
StringAlign=Right
AntiAlias=1
StringEffect=SHADOW
FontEffectColor=300,300,300,80

[MeterDate2]
Meter=String
MeasureName=MeasureDate2
MeterStyle=Style1
X=525
Y=-25
StringAlign=Right
AntiAlias=1
StringEffect=SHADOW
FontEffectColor=300,300,300,80

[MeterDate3]
Meter=String
MeasureName=MeasureDate3
MeterStyle=Style3
X=500
Y=115
StringAlign=right
AntiAlias=1
StringEffect=SHADOW
FontEffectColor=300,300,300,80
Ragingwasabi
Posts: 86
Joined: March 7th, 2015, 2:23 pm

Re: Skin relative to other skin?

Post by Ragingwasabi »

yea i think ur problem will be perfectly solved just by using relative positions as balala said. have a look at the link he posted
Kalamaja
Posts: 5
Joined: November 30th, 2015, 10:41 pm

Re: Skin relative to other skin?

Post by Kalamaja »

Relative positioning: If the value is appended with r, the position is relative to the top/left edge of the previous meter.

At the moment '01' is MeterDate1 and 'Dets' is MeterDate2. I want the '01' to be relative to the left side of 'Dets'. Does this mean that I need to put X=20r or whatever to MeterDate1? But it since it needs to be relative to the previous skin I need to change their orders in the file ('Dets' comes MeterDate1)?

I can't change 'Dets' to be relative to the right side of '01' because it changes in length and I always want it's right side to stay put.
User avatar
balala
Rainmeter Sage
Posts: 16164
Joined: October 11th, 2010, 6:27 pm
Location: Gheorgheni, Romania

Re: Skin relative to other skin?

Post by balala »

Kalamaja wrote:At the moment '01' is MeterDate1 and 'Dets' is MeterDate2. I want the '01' to be relative to the left side of 'Dets'. Does this mean that I need to put X=20r or whatever to MeterDate1? But it since it needs to be relative to the previous skin I need to change their orders in the file ('Dets' comes MeterDate1)?
Yes, you're right. Change the order of [MeterDate1] and [MeterDate2], to have the last one before the second (to have them properly positioned, you always should have the absolutely positioned meter on first place in your code, followed by the relatively positioned meters). After that, replace the X=10R option of the [MeterDate1] meter, with something like X=100r. This way the right side of [MeterDate1] ([MeterDate1] is right aligned) will be positioned with 100 pixels right of the previous meter (in this case [MeterDate2], which is true that is set to X=525, but this is its right side, because it's right aligned). You can look for a proper value, instead of 100, but this value should be a bit bigger then the width of [MeterDate1]. Anyway, no matter which month is, you won't have problems, because the month name is growing left side (being right aligned).
Kalamaja
Posts: 5
Joined: November 30th, 2015, 10:41 pm

Re: Skin relative to other skin?

Post by Kalamaja »

Hmm, I'm not sure what I am doing wrong. I changed the positions, but 150r pushed it to the right of the previous one. If I wanted it to be in the right place I had to put something like -230r, but when I change the length of 'Dets' it the '01' still doesn't move relatively.

Image
User avatar
balala
Rainmeter Sage
Posts: 16164
Joined: October 11th, 2010, 6:27 pm
Location: Gheorgheni, Romania

Re: Skin relative to other skin?

Post by balala »

If I'm not wrong, you want to have the day before the month, right? If so, the relative positioning won't help, so you have to find another solution. Try to return to the original code and replace the X option of the [MeterDate1] meter with this: X=(540-[MeterDate2:W]) (or find a proper value instead of 540). If you do so, don't forget to add the DynamicVariables=1 option to the [MeterDate1] meter.
Just two more comments about your code:
1. instead of substituting the month and day names (with those Substitute options), maybe you should try to add to the [MeasureDate2] and [MeasureDate3] measures the FormatLocale option (FormatLocale=de-DE - obviously de-DE is just an example, I don't know what is your language, but here you can find the identifiers). And in this case, maybe you want to replace the Format=%B option of the [MeasureDate2] measure, with Format=%b (because I think Jaan, Veebr, Märts, Apr, Mai and so on, are abbreviations).
2. a small issue is that you should move the Author option, from the [Rainmeter] section to [Metadata] (the Author is deprecated in the [Rainmeter] section, but it's valid in [Metadata]). This won't have any visible result, but it's better this way.
Kalamaja
Posts: 5
Joined: November 30th, 2015, 10:41 pm

Re: Skin relative to other skin?

Post by Kalamaja »

Everything seems to be working great now. Thank you.