It is currently April 27th, 2024, 12:10 pm

String Meters not aligning to right, text gets cut-off

Get help with creating, editing & fixing problems with skins
taskman
Posts: 11
Joined: December 11th, 2011, 7:32 pm

String Meters not aligning to right, text gets cut-off

Post by taskman »

I presenting this issue at the suggestion of the Developer. Here goes.

I'm doing simple customization to this skin http://hello-123456.deviantart.com/art/Unity-for-Rainmeter-3-0-201663145. I just need it do display my regularly used software applications. The issue I am having is to get the title text to display correctly to the right when I hover over the icons. It hovers correctly on the left side of the icons.

The string is set to StringAlign=Left by default and the title text is displayed correctly to the left. I set the String to StringAlign=Right it centers and the text is partially displayed.

My objective is to get the title text to align to the right and make the text displayed correctly, similar to the way it is displayed on the left.

Please see attach screenshots of the left and right align difference.

Your help would would be appreciated.
You do not have the required permissions to view the files attached to this post.
Last edited by taskman on December 19th, 2011, 5:44 am, edited 1 time in total.
User avatar
smurfier
Moderator
Posts: 1931
Joined: January 29th, 2010, 1:43 am
Location: Willmar, MN

Re: String Meters not aligning to right, text gets cut-off

Post by smurfier »

When you set a string to StringAlign=Right the X coordinate of the string becomes the right side. What you will need to do set the string to an X coordinate large enough to allow the whole string to display, then set the icon to the same or a slightly larger X coordinate.
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 . . .
taskman
Posts: 11
Joined: December 11th, 2011, 7:32 pm

Re: String Meters not aligning to right, text gets cut-off

Post by taskman »

I am about a week into this. I do not have a good grasp on this yet. Where do I do this? What codes do I need to add? And in which file?

Thanks.
taskman
Posts: 11
Joined: December 11th, 2011, 7:32 pm

Re: String Meters not aligning to right, text gets cut-off

Post by taskman »

I tried add the x co-ordinate in this code and did not get the desired result. What do I need to do?

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=LEFT
AntiAlias=1
taskman
Posts: 11
Joined: December 11th, 2011, 7:32 pm

Re: String Meters not aligning to right, text gets cut-off

Post by taskman »

I think I am making some progress. I will keep you posted. Just in case you have the complete solution go ahead and post it. Thanks.
User avatar
MerlinTheRed
Rainmeter Sage
Posts: 889
Joined: September 6th, 2011, 6:34 am

Re: String Meters not aligning to right, text gets cut-off

Post by MerlinTheRed »

I would try this:
  1. Try adding DynamicWindowSize=1 to the [Rainmeter] section of the skin
  2. Modify the x coordinates of all the text meters (Meter=String) so they are located just to the left of the icons. This could mean that you have to move all the icons to the right, because otherwise there won't be enough space on the left side of the icons for the text to fit in (stuff that goes beyond X=0 tends to be cut off.)
  3. Change the StringAlign to Right
If you want a complete solution, you have to post the complete code of the skin, otherwise we can't do much.
Have more fun creating skins with Sublime Text 2 and the Rainmeter Package!