http://rainmeter.net/forum/viewtopic.php?f=14&t=7063
I have a bar setup that has hidden buttons that are sized based on the width of the bar and it works perfectly with most widths but has a strange behavior with the 2 shortest bars.
I have created buttons that are only visible when you hover over the bar in width ranging from 15px (3 x 5px) to 81px (3 x 27px) in 3 px increments the bar has 20 buttons so the possible bar width should be able to be from 100px to 540px in 20px increments.
If I set the bar width anywhere between 140 and 540px it works as expected, but if I set it to 100 or 120 the buttons are always visible and the positioning is incorrect.
In the pics below (100px and 140px) I am hovering just left of the center which should be over the "Back :10" button. In the 140px version it is correct but in the 100/120px versions it shows "back 25min" I mention this to show the position error. In the 100/120 version pic the only button that should be visible is the one that I am hovering over and should show up as 5px above and below the bar as it appears in the 140px bar. I figure it can NOT be the code I am using because only certain widths are effected but I will post a snippet of it anyway.
The Code
Code: Select all
;vars read from a .inc file
PosBarW=100
PosBarH=10
;skin code
[MeasureVars]
Measure=Plugin
Plugin=Plugins\WebParser.dll
Url=file://D:\Documents\Rainmeter\Skins\RiverFront\Resources\Variables\UserVariables.inc
RegExp="(?siU)PosBarW=(.*)\n.*PosBarH=(.*)\n"
[MeasurePosBarW]
Measure=Plugin
Plugin=Plugins\Webparser.dll
Url=[MeasureVars]
StringIndex=1
[MeasurePosBarH]
Measure=Plugin
Plugin=Plugins\Webparser.dll
Url=[MeasureVars]
StringIndex=2
[Calc4ButW]
Measure=Calc
Formula=MeasurePosBarW/20
[Calc4ButH]
Measure=Calc
Formula=MeasurePosBarH+10
;[Display]*********************************************************************
[DisplayBackground]
Meter=IMAGE
X=0
Y=0
H=20
W=#PosBarW#
SolidColor=0,0,0,255
DynamicVariables=1
[PositionBar]
MeasureName=CalcElapsed
Meter=BAR
X=0
Y=5
W=#PosBarW#
H=#PosBarH#
BarColor=#PosBarColor#
SolidColor=#PosBarBkgColor#
BarOrientation=HORIZONTAL
[b60]
Meter=Button
X=0
Y=0
LeftMouseUpAction=!Execute ["#MCxx#" "/MCC 10035, 3600000"]
ButtonImage=#SKINSPATH#RiverFront\Resources\Images\Position\[Calc4ButW][Calc4ButH].png
ToolTipText=Back 1hr
DynamicVariables=1
I have restarted both Rainmeter and the computer and it makes no difference.
PS: I have a vertical bar that has buttons as thin as 1px that works perfectly so I don't see how it could be a minimum px issue, the only difference is the vert buttons are thin in height and the above referenced buttons are thin in width.