1. Positioning of Removable Drives:
The problem is that when you make a meter relative to the previous meter with
Y=10R for instance, then it is positioned 10 pixels below the "bottom" of the previous meter.
Now when a meter is "hidden", it has no "height", but it still has a "position" in vertical space, defined by the Y option. So if you add 10 pixels to the bottom of the meter, those 10 pixels are still added to the relative position of the second meter.
The point is, that if you have a meter using Y=10R, and you hide the meter above it, then the position of the second meter becomes 10. If you have a third meter below that, and you hide both of the ones above it, the position of the third meter will be 20.
The way to consider the "R" setting for relative positioning is that it means
(AnyValue+[PreviousMeter:Y]+[PreviousMeter:H]). This means that when [PreviousMeter] is "hidden", it becomes
(AnyValue+[PreviousMeter:Y]+0). What you are left with is whatever you have AnyValue set to.
What you need to do to avoid this is to try not to use any static value(s) in the relative position. What you want is that when a meter is "hidden", it has NO impact at all on subsequent meters.
Take a look at this example. There are lots of ways you can attack this, and this is just one, but it might point you in a direction that works for you.
Code: Select all
[Rainmeter]
Update=1000
DynamicWindowSize=1
AccurateText=1
[Variables]
[MeterBack]
Meter=Shape
Shape=Rectangle 1,1,150,([Meter1:H]+[Meter2:H]+[Meter3:H]+[Meter4:H]+10) | Fill Color 47,47,47,255 | Stroke Color 255,255,255,255 | StrokeWidth 2
DynamicVariables=1
LeftMouseUpAction=[!ShowMeterGroup All][!UpdateMeter *][!Redraw]
[MeterContainer]
Meter=Shape
X=10
Y=10
Shape=Rectangle 1,1,150,[MeterBack:H] | Fill Color 0,0,0,255 | StrokeWidth 0
DynamicVariables=1
[Meter1]
Meter=String
Group=All
FontSize=11
FontWeight=400
FontColor=255,255,255,255
SolidColor=47,47,47,1
Padding=0,0,0,10
AntiAlias=1
Text=I'm meter 1
Container=MeterContainer
LeftMouseUpAction=[!ShowMeterGroup All][!HideMeter Meter1][!UpdateMeter *][!Redraw]
[Meter2]
Meter=String
Group=All
X=r
Y=R
FontSize=11
FontWeight=400
FontColor=255,255,255,255
SolidColor=47,47,47,1
Padding=0,0,0,10
AntiAlias=1
Text=I'm meter 2
Container=MeterContainer
LeftMouseUpAction=[!ShowMeterGroup All][!HideMeter Meter2][!UpdateMeter *][!Redraw]
[Meter3]
Meter=String
Group=All
X=r
Y=R
FontSize=11
FontWeight=400
FontColor=255,255,255,255
SolidColor=47,47,47,1
Padding=0,0,0,10
AntiAlias=1
Text=I'm meter 3
Container=MeterContainer
LeftMouseUpAction=[!ShowMeterGroup All][!HideMeter Meter3][!UpdateMeter *][!Redraw]
[Meter4]
Meter=String
Group=All
X=r
Y=R
FontSize=11
FontWeight=400
FontColor=255,255,255,255
SolidColor=47,47,47,1
Padding=0,0,0,10
AntiAlias=1
Text=I'm meter 4
Container=MeterContainer
LeftMouseUpAction=[!ShowMeterGroup All][!HideMeter Meter4][!UpdateMeter *][!Redraw]
GIF.gif
So I'm doing a few things.
First, I just use
Y=R (or Y=0R) for each meter. This means they will be positioned relative to the bottom of the previous meter, with no extra "static" space between them.
Now we DO WANT some space between them, so to get that I use the Padding option to add some space to the "bottom" of each meter. The nice thing is that this space is also "hidden" (has no "height") when the meter is.
Then I use a Container to manage where all of this appears in the skin. I don't want any special X or Y on the very first meter, as things won't look right when IT is hidden. So I use the container to position the entire set of meters in a starting X and Y.
https://docs.rainmeter.net/manual/meters/general-options/#XY
https://docs.rainmeter.net/manual/meters/general-options/#Padding
https://docs.rainmeter.net/manual/meters/general-options/container/
You do not have the required permissions to view the files attached to this post.