This was a puzzling until I narrowed down what was occurring. At first I thought this was a bug or something with the GetW() Lua function which I was using when I first observed this. Maybe someone could comment on whether this is expected behavior or not.
Here's an example skin which demonstrates the behavior:
Code: Select all
[Variables]
Bg1=240,123,13
Bg2=73,165,211
Height=30
[Rainmeter]
AccurateText=1
DynamicWindowSize=1
Update=1000
[AreaText]
Meter=String
X=0
Y=0
; W=100
Text=This is a test
Antialias=1
ClipString=1
[Area]
Meter=Shape
X=0R
Y=0r
Shape=Rectangle 0,0,(500 - [#CURRENTSECTION#:X] - [#CURRENTSECTION#Text:W]),#Height#,0 | Fill Color #Bg1# | StrokeWidth 0
Shape2=Rectangle 0,(#Height# / 2),[#CURRENTSECTION#:W],(#Height# / 2),0 | Fill Color #Bg2# | StrokeWidth 0
DynamicVariables=1
However in the above skin code if we uncomment the W=100 then it produces a more expected result with both shape layers having a matching width. This made me question whether the above was intended behavior or not, since I would assume the text meter's width would be detected whether it had a fixed width or not. Finally if we instead add the same formula from Shape instead to the meters width (W) and use [#CURRENTSECTION#:W] for both shape layer widths we similarly get a more expected outcome:
Skin code with this latter change: