It is currently April 25th, 2024, 2:26 pm

String Meters with String Align get cut off.

Get help with creating, editing & fixing problems with skins
User avatar
JpsCrazy
Posts: 667
Joined: April 18th, 2010, 2:16 pm
Location: NY, USA

String Meters with String Align get cut off.

Post by JpsCrazy »

I'm trying to make a simple text skin.
If I set the string to StringAlign=Left it's fine.
I set the String to StringAlign=Right and it disappears.
Also, Center gets cut off, and only a small section in the middle is visible.
I tried setting a larger W, everything from 100 to 1,000 with no luck.
Also tried RIGHT and CENTER to see if it was case sensitive.
Nothing worked.
So, I tried setting a X value.
I finally got it to work with x=300

Any reason why it doesn't work without a high X?

Example code:

Code: Select all

[Rainmeter]
Update=1000

;--Time----------
[MeasureTime]
Measure=Time
Format=%#I:%M

[MeterTime]
MeasureName=MeasureTime
Meter=STRING
FontColor=50,50,50
FontSize=78
FontFace=Rockwell
StringAlign=RIGHT
StringStyle=Bold
AntiAlias=1
Text=%1
x=300
User avatar
nzdawghaus
Posts: 11
Joined: November 20th, 2009, 3:58 pm

Re: String Meters with String Align get cut off.

Post by nzdawghaus »

each skin starts out at x=0 & y=0 (top left corner). And it doesn't let anything go negative from that. So to align from the right, you have to pad the numbers enough so your string doesn't get clipped. Does that make any sense? :?
User avatar
jsmorley
Developer
Posts: 22629
Joined: April 19th, 2009, 11:02 pm
Location: Fort Hunt, Virginia, USA

Re: String Meters with String Align get cut off.

Post by jsmorley »

You need to set the X of a string meter to be the "starting point" of the string. The the string / text will display "starting from there".

With StringAlign=LEFT (the default) this will be the left edge of the meter. The string will display to the right of X
With StringAlign=CENTER this will be the middle. The string will center on X
With StringAlign=RIGHT this will be the right. The string will display to the left of X
User avatar
JpsCrazy
Posts: 667
Joined: April 18th, 2010, 2:16 pm
Location: NY, USA

Re: String Meters with String Align get cut off.

Post by JpsCrazy »

Ohhhh. That makes a lot more sense.
I just thought it was as far right as the skin was.
taskman
Posts: 11
Joined: December 11th, 2011, 7:32 pm

Re: String Meters with String Align get cut off.

Post by taskman »

I have a similar issue and tried the method used by the OP. Unfortunately, that did not work for my situation.

Any help would be appreciated.

[StringStyleOne]
FontColor=#Color#
FontSize=#Size#
FontFace=#Font#
StringStyle=#Style#
StringEffect=#FontEffect#
StringAlign=RIGHT
AntiAlias=1
X=500

Here is the full code below:

Code: Select all

;--------------------------------
;----Unity for Rainmeter Code----
;--------------------------------

[MeasureScreen]
Measure=Plugin
Plugin=Plugins\SysInfo.dll
SysInfoType=SCREEN_HEIGHT

[MeterUnityShadow]
Meter=IMAGE
X=0
Y=0
H=([MeasureScreen]-#Taskbarheight#)
W=68
ImageName=Shadow.png
ImageAlpha=#ShadowAlpha#
DynamicVariables=1

[MeterUnity]
Meter=IMAGE
X=0
Y=0
H=([MeasureScreen]-#Taskbarheight#)
W=58
ImageName=#UnityBG#
ImageAlpha=#UnityBGAlpha#
DynamicVariables=1

[ConfigHover]
Meter=Image
X=24
Y=([MeasureScreen]-(#Taskbarheight#+35))
H=30
W=30
MouseOverAction=!execute [!RainmeterShowMeter Config][!RainmeterRedraw]
MouseLeaveAction=!execute [!RainmeterHideMeter Config][!RainmeterRedraw]
DynamicVariables=1

[Config]
Meter=IMAGE
X=24
Y=([MeasureScreen]-(#Taskbarheight#+35))
H=30
W=30
ImageName=Gear.png
LeftMouseDownAction=!Execute ["#SKINSPATH#\Unity\Configure\config.exe"]
MiddleMouseDownAction=!Execute [explorer "#ROOTCONFIGPATH#"]
RightMouseDownAction=!Execute ["#SKINSPATH#\Unity\ReadMe.txt"]
Hidden=1
ImageTint=255, 255, 255, 40
UpdateRate=140
DynamicVariables=1

;-------------------------------

[StringStyleOne]
FontColor=#Color#
FontSize=#Size#
FontFace=#Font#
StringStyle=#Style#
StringEffect=#FontEffect#
StringAlign=RIGHT
AntiAlias=1
X=500
Last edited by smurfier on December 19th, 2011, 4:13 am, edited 1 time in total.
Reason: Added code tags.
User avatar
jsmorley
Developer
Posts: 22629
Joined: April 19th, 2009, 11:02 pm
Location: Fort Hunt, Virginia, USA

Re: String Meters with String Align get cut off.

Post by jsmorley »

These are all image meters and are not effected by StringAlign.
taskman
Posts: 11
Joined: December 11th, 2011, 7:32 pm

Re: String Meters with String Align get cut off.

Post by taskman »

At least that eliminate one location that I should not be tampering with. Does any of the following relates to the issue? Thanks.

Code: Select all

[Variables]
UnityBG=Unity.png
UnityBGAlpha=1
ShadowAlpha=0
Font=Trebuchet MS
Color=FFFFFF
Size=10
Style=BOLDITALIC
FontEffect=None
Taskbarheight=40

======================

[MeterIcon2]
Meter=Image
X=4
Y=38r
H=48
W=48
ImageName=#App2Icon#
MouseOverAction=!execute [!RainmeterShowMeter APP2_Text][!RainmeterRedraw]
MouseLeaveAction=!execute [!RainmeterHideMeter APP2_Text][!RainmeterRedraw]
LeftMouseDownAction=!Execute ["#App2Path#"]

[APP2_Text]
Meter=String
X=64
Y=16r
MeterStyle=StringStyleOne
Text=#App2Title#
Hidden=1
User avatar
jsmorley
Developer
Posts: 22629
Joined: April 19th, 2009, 11:02 pm
Location: Fort Hunt, Virginia, USA

Re: String Meters with String Align get cut off.

Post by jsmorley »

What issue?
taskman
Posts: 11
Joined: December 11th, 2011, 7:32 pm

Re: String Meters with String Align get cut off.

Post by taskman »

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

Re: String Meters with String Align get cut off.

Post by jsmorley »

I have no idea. You are just not helping us to help you. You need start a new thread instead of grave digging one from well over a year ago, post a link to your skin, (I have never heard of Unity, and can hardly do any testing or research on it without it) describe what you are trying to do in changing the skin, and what is or isn't working right. Posting code you have changed in "" tags can help to see if you are on the right track or not.

I just have no clue what you are trying to do, what isn't working, and have no way to dig into it.