jsmorley wrote:Someone on IRC asked how to put a border on a meter...
I think if the SolidColor of the String meter is opaque, something similar could be created even without using a Shape meter:
Code: Select all
[Rainmeter]
Update=1000
DynamicWindowSize=1
AccurateText=1
[Variables]
BorderWidth=3
BorderColor=150,150,150,255
[MeterBorder]
Meter=Image
SolidColor=#BorderColor#
X=0
Y=0
W=(2*#BorderWidth#+[MeterText:W])
H=(2*#BorderWidth#+[MeterText:H])
DynamicVariables=1
[MeterText]
Meter=String
X=#BorderWidth#
Y=#BorderWidth#
FontSize=20
FontWeight=400
FontColor=255,255,255,255
SolidColor=47,47,47,255
Padding=5,5,5,5
AntiAlias=1
Text=Hello World
However, the Shape meter has the great advantage that even a rounded border can be applied, which can't be with an Image meter:
Code: Select all
[Rainmeter]
Update=1000
DynamicWindowSize=1
AccurateText=1
[Variables]
BorderWidth=3
BorderColor=150,150,150,255
;[MeterBorder]
;Meter=Image
;SolidColor=#BorderColor#
;X=0
;Y=0
;W=(2*#BorderWidth#+[MeterText:W])
;H=(2*#BorderWidth#+[MeterText:H])
;DynamicVariables=1
[MeterText]
Meter=String
X=#BorderWidth#
Y=#BorderWidth#
FontSize=20
FontWeight=400
FontColor=255,255,255,255
SolidColor=47,47,47,255
Padding=5,5,5,5
AntiAlias=1
Text=Hello World
[MeterBorder]
Meter=Shape
Shape=Rectangle #BorderWidth#, #BorderWidth#, [MeterText:W], [MeterText:H], 5 | Fill Color 0,0,0,0 | StrokeWidth #BorderWidth# | Stroke Color #BorderColor#
DynamicVariables=1