It is currently April 27th, 2024, 7:15 pm

Problem with StringAlign set to Right

Report bugs with the Rainmeter application and suggest features.
g4bryel
Posts: 1
Joined: September 3rd, 2011, 9:20 am

Problem with StringAlign set to Right

Post by g4bryel »

If I set in a string meter StringAlign=Right and Text="Rainmeter " for example, the last character (" ") is not displayed.

This is a skin that shows the problem:

Code: Select all

[Rainmeter]
Update=10000

[line1]
Meter=Image
x=0
y=1
w=1
h=120
SolidColor= 0,0,0

[line2]
Meter=Image
x=200
y=1
w=1
h=120
SolidColor= 0,0,0

[textAleft]
Meter=String
x=0
y=0
FontFace=Arial
FontSize=20
FontColor=0,0,0
AntiAlias=1
StringAlign=Left
Text="RAINMETER"

[textAright]
Meter=String
x=200
y=60
FontFace=Arial
FontSize=20
FontColor=0,0,0
AntiAlias=1
StringAlign=Right
Text="RAINMETER"

[textAleft2]
Meter=String
x=0
y=30
FontFace=Arial
FontSize=20
FontColor=0,0,0
AntiAlias=1
StringAlign=Left
Text=" RAINMETER"

[textAright2]
Meter=String
x=200
y=90
FontFace=Arial
FontSize=20
FontColor=0,0,0
AntiAlias=1
StringAlign=Right
Text="RAINMETER "
User avatar
smurfier
Moderator
Posts: 1931
Joined: January 29th, 2010, 1:43 am
Location: Willmar, MN

Re: Problem with StringAlign set to Right

Post by smurfier »

Rainmeter strips the spaces off the end of each line when reading the file. This is part of the INI standard.
GitHub | DeviantArt | Tumblr
This is the song that never ends. It just goes on and on my friends. Some people started singing it not knowing what it was, and they'll continue singing it forever just because . . .
User avatar
MerlinTheRed
Rainmeter Sage
Posts: 889
Joined: September 6th, 2011, 6:34 am

Re: Problem with StringAlign set to Right

Post by MerlinTheRed »

Even if there are quotes around the string? Sounds kinda wrong. But if it's the standard...
Have more fun creating skins with Sublime Text 2 and the Rainmeter Package!
poiru
Developer
Posts: 2872
Joined: April 17th, 2009, 12:18 pm

Re: Problem with StringAlign set to Right

Post by poiru »

MerlinTheRed wrote:Even if there are quotes around the string? Sounds kinda wrong. But if it's the standard...
Due to the quotes, the space is indeed kept. This is a problem elsewhere and will likely be fixed has already been fixed for 2.4 beta.
poiru
Developer
Posts: 2872
Joined: April 17th, 2009, 12:18 pm

Re: Problem with StringAlign set to Right

Post by poiru »

Unfortunately this will not be fixed after all due to a problem with how GDI+ handles newlines (#CRLF#) with the fix. This may be fixed at a later date.