It is currently April 27th, 2024, 5:38 am

Randomly Moving Text

Get help with creating, editing & fixing problems with skins
twiglet015
Posts: 2
Joined: July 11th, 2012, 10:15 am

Randomly Moving Text

Post by twiglet015 »

Hi all, it's my first time posting. :welcome: I haven't been using Rainmeter for very long, still learning, so I hope this is a simple problem with a simple fix.

I'm having a problem with a date string. I notice that the day/month/numbers move on their x axis randomly day to day. E.g. one day I will set them so they are as far apart as I want them, then the next they will be overlapping.

I'm using Rainmeter version 2.2.0 on 64-bit Windows 7.

Code: Select all

[Rainmeter]
Author=Falconer
Update=1000
AppVersion=1000000

[Metadata]
Name=Date
Config=Elementary | Date
Description=day, month, and date.
Instructions=
Version=beta
Tags=basic | elementary | clean | Century Gothic | Date
License=Creative Commons Attribution-Non-Commercial-Share Alike 3.0

[Variables]
@include=#RootConfigPath#\Group1\Variables.inc

;--------Measures--------

[MeasureDay]
Measure=Time
Format=%A,

[MeasureMonth]
Measure=Time
Format=%B

[MeasureDate]
Measure=Time
Format=%#d


;--------Meters--------

[MeterDay]
MeasureName=MeasureDay
Meter=STRING
X=0
Y=0
FontColor=#Color#
FontSize=22
FontFace=#Font#
StringAlign=LEFT
StringStyle=#Style#
StringEffect=#Effect#
FontEffectColor=#EffectColor#
AntiAlias=1

[MeterMonth]
MeasureName=MeasureMonth
Meter=STRING
X=100r
Y=0
FontColor=#Color#
FontSize=22
FontFace=#Font#
StringAlign=LEFT
StringStyle=#Style#
StringEffect=#Effect#
FontEffectColor=#EffectColor#
AntiAlias=1

[MeterDate]
MeasureName=MeasureDate
Meter=STRING
X=172
Y=0
FontColor=#Color#
FontSize=22
FontFace=#Font#
StringAlign=LEFT
StringStyle=#Style#
StringEffect=#Effect#
FontEffectColor=#EffectColor#
AntiAlias=1
If the X axis values seem random, it's from me trying to fix it.

Image

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

Re: Randomly Moving Text

Post by jsmorley »

You can use the "R" option on the X value to have a meter position relative to the previous meter in the .ini.

So if you do it like this:

Code: Select all

[MeterDay]
MeasureName=MeasureDay
Meter=STRING
X=0
Y=0
FontColor=#Color#
FontSize=22
FontFace=#Font#
StringAlign=LEFT
StringStyle=#Style#
StringEffect=#Effect#
FontEffectColor=#EffectColor#
AntiAlias=1

[MeterMonth]
MeasureName=MeasureMonth
Meter=STRING
X=0R
Y=0
FontColor=#Color#
FontSize=22
FontFace=#Font#
StringAlign=LEFT
StringStyle=#Style#
StringEffect=#Effect#
FontEffectColor=#EffectColor#
AntiAlias=1

[MeterDate]
MeasureName=MeasureDate
Meter=STRING
X=0R
Y=0
FontColor=#Color#
FontSize=22
FontFace=#Font#
StringAlign=LEFT
StringStyle=#Style#
StringEffect=#Effect#
FontEffectColor=#EffectColor#
AntiAlias=1
Then the meters will always position one after the other no matter how long any given meter is on any given day or month.

Note: "R" positions a meter relative to the "end" of the previous meter, and "r" positions a meter relative to the "beginning" of the previous meter. It can have a value before it, like X=10R or Y=20R to add spacing in addition to the relative position.
twiglet015
Posts: 2
Joined: July 11th, 2012, 10:15 am

Re: Randomly Moving Text

Post by twiglet015 »

:D Amazing thanks a lot that worked a treat!
User avatar
MerlinTheRed
Rainmeter Sage
Posts: 889
Joined: September 6th, 2011, 6:34 am

Re: Randomly Moving Text

Post by MerlinTheRed »

The "r" and "R" settings don't seem to respect the StringAlign settings. If you align something to the right you can't easily put a meter left of it.
Have more fun creating skins with Sublime Text 2 and the Rainmeter Package!
User avatar
Kaelri
Developer
Posts: 1721
Joined: July 25th, 2009, 4:47 am

Re: Randomly Moving Text

Post by Kaelri »

MerlinTheRed wrote:The "r" and "R" settings don't seem to respect the StringAlign settings. If you align something to the right you can't easily put a meter left of it.
The problem is that "r" means "relative to the origin," and "R" means "relative to the bottom-right corner." In the case of a right-aligned string meter, those coordinates are both the same (x-wise). And changing that behavior would break backwards compatibility, so it's a bit of a dilemma.