Quantcast
Channel: Rainmeter Forums
Viewing all articles
Browse latest Browse all 1536

Help: Rainmeter Skins • Re: Align static text based on dynamic text

$
0
0
The last change I'm making to the awesome Weather Time Bar is to add some static text that will display next to the current condition. However, I'm having a hard time getting the spacing to react dynamically so there's no large gaps or overlapping of text. I've replaced the location value with static text "Right now, it's". Then on the next line is the current condition, with static text "and", then the next line is the current temp. "and" is the text that needs to be spaced dynamically to the right of whatever the current condition is. I thought I had it working using Padding, but as soon as the skin updated from "Sunny" to "Fair", the spacing failed and resulted in a large gap. What is the best way to handle this scenario? Here's the code I've got so far:

Code:

[MeterLocation]Meter=StringMeasureName=MeasureCityMeasureName2=MeasureAdminDistrictCodeX=(#size#*260)Y=(#size#*50)W=(#size#*300)H=(#size#*50)FontColor=#FontColor#FontSize=(#size#*12)StringStyle=normalStringEffect=SHADOWFontFace=#FontFace#StringAlign=LeftFontEffectColor=0,0,0,50AntiAlias=1ClipString=1Text=Right now, it's  [MeterTempText]Meter=StringMeasureName=MeasureTempTextX=(#size#*290)Y=(#size#*82)W=(#size#*120)H=(#size#*40);FontColor=[#TempColor[&MeasureColor#TempFormat#]]SolidColor=125,125,125,0FontColor=#FontColor#StringStyle=normalStringEffect=SHADOWFontFace=#FontFace#StringAlign=LeftCenter;FontEffectColor=168,168,168FontEffectColor=0,0,0,50AntiAlias=1ClipString=1FontSize=(#size#*12)Padding=20,0,0,0Text=and;DynamicVariables=1[MeterTemp]Meter=StringMeasureName=MeasureTempX=(#size#*260)Y=(#size#*109)W=(#size#*120)H=(#size#*40);FontColor=[#TempColor[&MeasureColor#TempFormat#]]FontColor=#FontColor#StringStyle=normalStringEffect=SHADOWFontFace=#FontFace#StringAlign=LeftCenter;FontEffectColor=168,168,168FontEffectColor=0,0,0,50AntiAlias=1ClipString=1FontSize=(#size#*25)Text= %1°DynamicVariables=1
To display text on separate lines use #CRLF#
https://docs.rainmeter.net/manual/variables/built-in-variables/#CRLF
Replace in your code [MeterLocation], [MeterTempText] and [MeterTemp] with the code below:

Code:

[MeterDisplayWeatherInfo]Meter=StringMeasureName=MeasureConditionMeasureName2=MeasureTempX=(#size#*260)Y=(#size#*50)W=(#size#*300)H=(#size#*150)FontColor=#FontColor#FontSize=(#size#*12)StringStyle=normalStringEffect=SHADOWFontFace=#FontFace#StringAlign=leftFontEffectColor=0,0,0,50AntiAlias=1ClipString=1Text=Right now, it's#CRLF#%1 and#CRLF#%2°

Statistics: Posted by xenium — Today, 10:36 am



Viewing all articles
Browse latest Browse all 1536

Trending Articles