It is currently April 26th, 2024, 11:48 pm

Simple string meter questions.

Get help with creating, editing & fixing problems with skins
Tijaiha
Posts: 3
Joined: July 12th, 2010, 12:40 pm
Location: WI

Simple string meter questions.

Post by Tijaiha »

I am having a few issues with strings. I have built the following skin through the use of Rainmeter 101. I just have a few questions with how it has turned out.

First of all, I am having issues with the StringAlign=RIGHT. If I align right, the string disappears. If I align left, it works normally. Regardless of relative alignment being commented out or not, I can't seem to get the string to appear anywhere on my screen. I would like to align right so the skin can sit in the lower right of my desktop without having the string pushed beyond the edge of my screen.

Second, the string occasionally gets cut off on the far right edge, regardless of the positioning on the screen, shearing off half of the last number:
Capture.JPG
I would also like to position it relative to another skin. More specifically, CornerCal.
Capture2.JPG
In Rainmeter.ini, I have my skin directly below CornerCal, and using the relative alignment (x,y=0R) , that should align it to the bottom right edge of CornerCal. Is this the inside or outside edge? Any help would be greatly appreciated. This is my first attempt at making a skin.

Note: Attached images are using two different formats, "locale-time" and "%H : %M". The issues stated above affect both formats.

My skin:

Code: Select all

[Rainmeter]
Author=David Sorensen
Update=1000 

[Metadata]
Name=Simple Clock 
Config=Personal | Clock 
Description=My first skin.
Instructions=
Version=
License= 
Variant= 

[MeasureTime]
Measure=Time
Format="%H:%M"

[MeterTime]
Meter=String
MeasureName=MeasureTime
x=0R
y=0R
FontFace=Denmark
FontColor=edd400
FontSize=50
AntiAlias=1
StringAlign=LEFT
Text=%1
You do not have the required permissions to view the files attached to this post.
User avatar
jsmorley
Developer
Posts: 22631
Joined: April 19th, 2009, 11:02 pm
Location: Fort Hunt, Virginia, USA

Re: Simple string meter questions.

Post by jsmorley »

Without getting into the specifics of your questions, let me point out two things that might be a help:

1) The way StringAlign works is that it is used by combining the X= and W= statements on a string meter. If you think about it, LEFT alignment is easy. Just starts at whatever X= is set to and displays to the right of that. However, CENTER and RIGHT require an answer to the question "from what?". The way you do this is to define the width (W=) of the meter, and the set the X= to either the center or right value for this width.

Examples:

[MeterLeft]
Meter=String
X=0
Y=0
StringAlign=LEFT
Just aligns left starting at position 0

[MeterCenter]
Meter=String
W=200
H=15
X=100
Y=0
StringAlign=CENTER
Centers the string on position 100

[MeterRight]
Meter=String
W=200
H=15
X=200
Y=0
StringAlign=RIGHT
Aligns the string so it ends at position 200

2) Text cut off:

This is because when a string meter is first created, the "container" Rainmeter makes for it is based on the initial value of the string. If the length "grows" due to the value changing, the meter can be cut off. This can be corrected by adding a statement to the [Rainmeter] section of the skin:

[Rainmeter]
DynamicWindowSize=1


Hope this helps.
User avatar
Chewtoy
Moderator
Posts: 995
Joined: June 10th, 2009, 12:44 pm
Location: Sweden

Re: Simple string meter questions.

Post by Chewtoy »

If you have StringAling=Right you have to put in a higher X-value.
See like this: Your string starts here |, now look at the difference in alignment.
Right|Left
Rainmeter will print out from that one spot, but it can't display anything that less than X=0, so if you put a higher X-value, it will be shown.

As for the cut off, it's because the window which the skin creats when loaded is not big enough to fit everything in it.
You can either use a background that's bigger, or add DynamicWindowSize=1 to the [Rainmeter] section, which will expand the window if needed so you don't get the cutoff.


The relative to another skin part I remember that dragonmage said something about on IRC some time ago... Can't remember what it was really.
But does it really have to be relative? Why not just move them so they fit like they have to?


Edit: jsmorley beat me to it. :/
I don't think, therefore I'm not.
Tijaiha
Posts: 3
Joined: July 12th, 2010, 12:40 pm
Location: WI

Re: Simple string meter questions.

Post by Tijaiha »

Makes perfect sense now. Thank you!

Great response times for a great tool. Can't beat that. ;)
Tijaiha
Posts: 3
Joined: July 12th, 2010, 12:40 pm
Location: WI

Re: Simple string meter questions.

Post by Tijaiha »

Chewtoy wrote:But does it really have to be relative? Why not just move them so they fit like they have to?
Still not sold on the position/monitor it will be displayed on. Also, I'm just trying to learn for future reference. :p