Sth like the use of an image for Background with BackgroundMode=3 mode.
#1: I'd like someone take a deeper look into the code and check out have i done it right and is there any better solution for any part of the code?
#2: is there a better solution to set the minimal skin height instead of using a transparent meter on the top of the code? Value of TopMarginFormula variable should be used for that purpose, to determine the minimal skin height to the top.
Code: Select all
[Rainmeter]
Update=1000
MiddleMouseDownAction=[!Refresh]
AccurateText=1
DynamicWindowSize=1
[Variables]
ShapeTopColor=0,0,0
ShapeTopOpacity=150
ShapeBodyColor=0,0,0
ShapeBodyOpacity=150
CornerRadius=5
Stroke_Width=1
Scale=1
;Content for Show-Hide
Txt1=1
Txt2=1
;Bg and content positioning
TopMargin=27
BottomMargin=0
BgOffset=5
BgShapeX=#BgOffset#
BgShapeY=#BgOffset#
BgShapeW=196
; Variables calculations
BgWidth=(#BgShapeW# + (#BgOffset# * 2))
CenterAlign=((#BgShapeW# / 2 ) + #BgOffset#)
TopMarginFormula=(#TopMargin# + #BgOffset# - 1)
[styleTitle]
StringAlign=CENTER
StringCase=UPPER
StringStyle=BOLD
FontColor=255,255,255,255
FontFace=Trebuchet MS
FontSize=10
AntiAlias=1
[MeterBackground]
Meter=Shape
;Frame
X=0
Y=0
W=(((#BgShapeW# + 1) + (#BgOffset# * 2)) * #Scale#)
H=([MeterBackgroundHeight:Y] * #scale#)
Shape=Rectangle (#BgShapeX# * #Scale#),(#BgShapeY# * #Scale#),((#BgShapeW# + 1) * #Scale#),([[#CURRENTSECTION]:H] - ((#BgShapeX# * 2) * #Scale#)),((#CornerRadius#+0.5) * #Scale#) | StrokeWidth (#Stroke_Width# * #Scale#) | Stroke Color 160,160,160,255 | Fill Color 0,0,0,0
;Top shape
Shape2=Rectangle ((#BgShapeX# + 0.5) * #Scale#),((#BgShapeY# + 0.5) * #Scale#),((#BgShapeW#) * #Scale#),(21 * #Scale#),(#CornerRadius# * #Scale#) | StrokeWidth 0 | Fill Color #ShapeTopColor#,#ShapeTopOpacity#
Shape3=Rectangle ((#BgShapeX# + 0.5) * #Scale#),((#BgShapeY# + 9) * #Scale#),((#BgShapeW#) * #Scale#),(14 * #Scale#)
Shape4=Combine Shape2 | Union Shape3
;Bottom shape
Shape5=Rectangle ((#BgShapeX# + 0.5) * #Scale#),((#BgShapeY# + 25) * #Scale#),((#BgShapeW#) * #Scale#),([[#CURRENTSECTION]:H] - (((#BgShapeX#+12.8) * 2) * #Scale#)),(#CornerRadius# * #Scale#) | StrokeWidth 0 | Fill Color #ShapeBodyColor#,#ShapeBodyOpacity#
Shape6=Rectangle ((#BgShapeX# + 0.5) * #Scale#),((#BgShapeY# + 25) * #Scale#),((#BgShapeW#) * #Scale#),(15 * #Scale#)
Shape7=Combine Shape5 | Union Shape6
DynamicVariables=1
;\\\\\\\\\\\\\\\\\\\\TEST METERS////////////////////
[Meter1]
Meter=String
MeterStyle=styleTitle
X=#CenterAlign#
Y=#TopMarginFormula#
Text=ONE
Hidden=(#Txt1# = 0)
TransformationMatrix=#Scale#;0;0;#Scale#;#Scale#;#Scale#
[Meter2]
Meter=String
MeterStyle=styleTitle
X=#CenterAlign#
Y=1R
Text=TWO
Hidden=(#Txt2# = 0)
TransformationMatrix=#Scale#;0;0;#Scale#;#Scale#;#Scale#
;;\\\\\\\\\\\\\\\\\\\\Bg HEIGHT DETERMINATOR////////////////////
[MeterBackgroundHeight]
Meter=Image
SolidColor=255,255,255,110
X=0
Y=(#BottomMargin# + #BgOffset# + 1)R
W=(#BgWidth# * #scale#)
H=1
TransformationMatrix=#Scale#;0;0;#Scale#;#Scale#;#Scale#
Also, set the variables to 0 to see why i want to set the min skin height.