Code: Select all
; this is from the illustro\disk gauge
[Rainmeter]
Update=1000
Background=#@#Background.png
BackgroundMode=3
BackgroundMargins=0,34,0,14
SkinHeight=147 ; I added this line
Code: Select all
; this is from the illustro\disk gauge
[Rainmeter]
Update=1000
Background=#@#Background.png
BackgroundMode=3
BackgroundMargins=0,34,0,14
SkinHeight=147 ; I added this line
Not sure. Do you want to keep the height of the skin unchanged, regardless how many meters do you have? I better think you'd need to do this exactly vice-versa: changing the height of the skin depending on how many meters do you have shown, don't you?russdirks wrote:After more investigation, I have found that if you leave off the SkinHeight option, and just add more string meters to the skin, then the header stays the same height.
The reason I was trying to use the SkinHeight option is because I was investigating ways to keep a skin the same height vertically, even when there are more or less string meters being displayed. My application is hiding and displaying string meters dynamically from an external program. Any ideas how I could do that without using SkinHeight?
Code: Select all
[Rainmeter]
Update=1000
Background=#@#Background.png
BackgroundMode=3
BackgroundMargins=0,34,0,14
[Metadata]
Name=Disk
Author=poiru
Information=Displays disk usage.
License=Creative Commons BY-NC-SA 3.0
Version=1.0.0
[Variables]
fontName=Trebuchet MS
textSize=8
colorBar=235,170,0,255
colorText=255,255,255,205
disk1=C:
disk2=D:
Show=1
; ----------------------------------
; MEASURES return some kind of value
; ----------------------------------
[measureTotalDisk1]
Measure=FreeDiskSpace
Drive=#disk1#
Total=1
UpdateDivider=120
[measureUsedDisk1]
Measure=FreeDiskSpace
Drive=#disk1#
InvertMeasure=1
UpdateDivider=120
[measureTotalDisk2]
Measure=FreeDiskSpace
Drive=#disk2#
Total=1
UpdateDivider=120
[measureUsedDisk2]
Measure=FreeDiskSpace
Drive=#disk2#
InvertMeasure=1
UpdateDivider=120
; ----------------------------------
; STYLES are used to "centralize" options
; ----------------------------------
[styleTitle]
StringAlign=Center
StringCase=Upper
StringStyle=Bold
StringEffect=Shadow
FontEffectColor=0,0,0,50
FontColor=#colorText#
FontFace=#fontName#
FontSize=10
AntiAlias=1
ClipString=1
[styleLeftText]
StringAlign=Left
StringCase=None
StringStyle=Bold
StringEffect=Shadow
FontEffectColor=0,0,0,20
FontColor=#colorText#
FontFace=#fontName#
FontSize=#textSize#
AntiAlias=1
ClipString=1
[styleRightText]
StringAlign=Right
StringCase=None
StringStyle=Bold
StringEffect=Shadow
FontEffectColor=0,0,0,20
FontColor=#colorText#
FontFace=#fontName#
FontSize=#textSize#
AntiAlias=1
ClipString=1
[styleBar]
BarColor=#colorBar#
BarOrientation=HORIZONTAL
SolidColor=255,255,255,15
; ----------------------------------
; METERS display images, text, bars, etc.
; ----------------------------------
[meterTitle]
Meter=String
MeterStyle=styleTitle
X=100
Y=12
W=190
H=18
Text=Disk
LeftMouseUpAction=[!SetVariable Show "(1-#Show#)"][!UpdateMeterGroup "Disk2"][!Redraw]
DynamicVariables=1
[meterLabelDisk1]
Meter=String
MeterStyle=styleLeftText
X=10
Y=40
W=190
H=14
Text=#disk1#\
[meterValueDisk1]
Meter=String
MeterStyle=styleRightText
MeasureName=measureUsedDisk1
MeasureName2=measureTotalDisk1
X=200
Y=0r
W=190
H=14
Text=%1B/%2B used
NumOfDecimals=1
AutoScale=1
LeftMouseUpAction=["#disk1#\"]
[meterBarDisk1]
Meter=Bar
MeterStyle=styleBar
MeasureName=measureUsedDisk1
X=10
Y=52
W=190
H=1
[meterLabelDisk2]
Meter=String
MeterStyle=styleLeftText
X=10
Y=(40+20*#Show#)
W=190
H=14
Text=#disk2#\
Group=Disk2
Hidden=(1-#Show#)
DynamicVariables=1
[meterValueDisk2]
Meter=String
MeterStyle=styleRightText
MeasureName=measureUsedDisk2
MeasureName2=measureTotalDisk2
X=200
Y=0r
W=190
H=14
Text=%1B/%2B used
NumOfDecimals=1
AutoScale=1
LeftMouseUpAction=["#disk2#\"]
Group=Disk2
Hidden=(1-#Show#)
DynamicVariables=1
[meterBarDisk2]
Meter=Bar
MeterStyle=styleBar
MeasureName=measureUsedDisk2
X=10
Y=(52+20*#Show#)
W=190
H=1
Group=Disk2
Hidden=(1-#Show#)
DynamicVariables=1
Code: Select all
[Rainmeter]
Update=1000
Background=#@#Background.png
BackgroundMode=3
BackgroundMargins=0,34,0,14
[Metadata]
Name=Disk
Author=poiru
Information=Displays disk usage.
License=Creative Commons BY-NC-SA 3.0
Version=1.0.0
[Variables]
fontName=Trebuchet MS
textSize=8
colorBar=235,170,0,255
colorText=255,255,255,205
disk1=C:
disk2=D:
Show=1
; ----------------------------------
; MEASURES return some kind of value
; ----------------------------------
[measureTotalDisk1]
Measure=FreeDiskSpace
Drive=#disk1#
Total=1
UpdateDivider=120
[measureUsedDisk1]
Measure=FreeDiskSpace
Drive=#disk1#
InvertMeasure=1
UpdateDivider=120
[measureTotalDisk2]
Measure=FreeDiskSpace
Drive=#disk2#
Total=1
UpdateDivider=120
[measureUsedDisk2]
Measure=FreeDiskSpace
Drive=#disk2#
InvertMeasure=1
UpdateDivider=120
; ----------------------------------
; STYLES are used to "centralize" options
; ----------------------------------
[styleTitle]
StringAlign=Center
StringCase=Upper
StringStyle=Bold
StringEffect=Shadow
FontEffectColor=0,0,0,50
FontColor=#colorText#
FontFace=#fontName#
FontSize=10
AntiAlias=1
ClipString=1
[styleLeftText]
StringAlign=Left
StringCase=None
StringStyle=Bold
StringEffect=Shadow
FontEffectColor=0,0,0,20
FontColor=#colorText#
FontFace=#fontName#
FontSize=#textSize#
AntiAlias=1
ClipString=1
[styleRightText]
StringAlign=Right
StringCase=None
StringStyle=Bold
StringEffect=Shadow
FontEffectColor=0,0,0,20
FontColor=#colorText#
FontFace=#fontName#
FontSize=#textSize#
AntiAlias=1
ClipString=1
[styleBar]
BarColor=#colorBar#
BarOrientation=HORIZONTAL
SolidColor=255,255,255,15
; ----------------------------------
; METERS display images, text, bars, etc.
; ----------------------------------
[meterTitle]
Meter=String
MeterStyle=styleTitle
X=100
Y=12
W=190
H=18
Text=Disk
LeftMouseUpAction=[!SetVariable Show "(1-#Show#)"][!UpdateMeterGroup "Disk2"][!Redraw]
DynamicVariables=1
[meterLabelDisk1]
Meter=String
MeterStyle=styleLeftText
X=10
Y=40
W=190
H=14
Text=#disk1#\
[meterValueDisk1]
Meter=String
MeterStyle=styleRightText
MeasureName=measureUsedDisk1
MeasureName2=measureTotalDisk1
X=200
Y=0r
W=190
H=14
Text=%1B/%2B used
NumOfDecimals=1
AutoScale=1
LeftMouseUpAction=["#disk1#\"]
[meterBarDisk1]
Meter=Bar
MeterStyle=styleBar
MeasureName=measureUsedDisk1
X=10
Y=52
W=190
H=1
[meterLabelDisk2]
Meter=String
MeterStyle=styleLeftText
X=10
Y=0R
W=190
H=14
Text=#disk2#\
Group=Disk2
Hidden=(1-#Show#)
DynamicVariables=1
[meterValueDisk2]
Meter=String
MeterStyle=styleRightText
MeasureName=measureUsedDisk2
MeasureName2=measureTotalDisk2
X=200
Y=0r
W=190
H=14
Text=%1B/%2B used
NumOfDecimals=1
AutoScale=1
LeftMouseUpAction=["#disk2#\"]
Group=Disk2
Hidden=(1-#Show#)
DynamicVariables=1
[meterBarDisk2]
Meter=Bar
MeterStyle=styleBar
MeasureName=measureUsedDisk2
X=10
Y=0R
W=190
H=1
Group=Disk2
Hidden=(1-#Show#)
Yes that is correct. I have an application that I've written that displays a number of lines of data. Each line is positioned relative to the one above it, for easy modifications. When my application is not running, I want to hide the lines of data and simply display "The application is offline", and not have the skin shrink vertically.Not sure. Do you want to keep the height of the skin unchanged, regardless how many meters do you have?
The BackgroundMode=3 option (set in the [Rainmeter] section) tells Rainmeter to scale the image used as background. If you add a SkinHeight option, the background will be scaled to the specified height and it seems the header will be scaled proportionally, ignoring the BackgroundMargins. However I'm not very sure.russdirks wrote:It's not a big concern for me now, but what about that that SkinHeight and BackgroundMargins issue? Is it supposed to be that way or is that a bug?