It is currently October 21st, 2021, 3:42 pm

Tooltip on not visible meter

Report bugs with the Rainmeter application and suggest features.
User avatar
balala
Rainmeter Sage
Posts: 13334
Joined: October 11th, 2010, 6:27 pm
Location: Gheorgheni, Romania

Re: Tooltip on not visible meter

Post by balala »

jsmorley wrote: September 7th, 2021, 1:08 pm This behavior is regrettable in my view. I'm not entirely sure what the backwards compatibility issues would really be, but assuming they are manageable, I'd like to explore making all meters behave like Shape does. I have a hard time coming up with any logical justification for the current behavior.
Alright. Thank you for all the effort making to improve Rainmeter.
User avatar
balala
Rainmeter Sage
Posts: 13334
Joined: October 11th, 2010, 6:27 pm
Location: Gheorgheni, Romania

Re: Tooltip on not visible meter

Post by balala »

death.crafter wrote: September 7th, 2021, 2:53 am There is an option ToolTipHidden. My be you can use it with conjunction with MouseOverAction and MouseLeaveAction, since they respect the visibility of the meter.
For first I didn't realize what you meant by this, but finally today had some time to dig into it and now figured it out. This is an extremely great idea! Many thanks for sharing it. Even if a little bit late, here is an example on how to do this, if anyone interested:

Code: Select all

[Rainmeter]
Update=1000
AccurateText=1

[Variables]
Size=1
Slide=0
Tool=1

[StringStyle]
StringEffect=Shadow
FontColor=255,255,255
FontSize=(#Size#*25)
FontFace=Segoe UI
StringStyle=Bold
StringAlign=Center
AntiAlias=1
DynamicVariables=1
ToolTipHidden=#Tool#
Container=MeterCont
Group=Tooltips

;======================

[MeterBackground]
Meter=Shape
Shape=Rectangle (#Size#*1),(#Size#*1),(#Size#*200),(#Size#*200),(#Size#*4) | StrokeWidth (#Size#*2) | FillColor 50,60,120,220 | Stroke Color 255,255,255
DynamicVariables=1

[Header]
Meter=String
X=(#Size#*100)
Y=(#Size#*50)
StringStyle=NORMAL
FontSize=(#Size#*17)
StringAlign=Center
FontFace=Segoe UI
StringEffect=SHADOW
FontEffectColor=0,0,0
AntiAlias=1
Text=↑#CRLF#Scroll mouse for Up or Down#CRLF#CONTAINER TEST
InlinePattern="Scroll mouse for Up or Down"
InlineSetting=Size | (#Size#*11)
InlineSetting2=GradientColor | 270 | 255,255,255 ; 0.2 | 80,80,255 ; 0.9

[Header2]
Meter=String
X=(#Size#*100)
Y=(#Size#*140)
StringStyle=NORMAL
FontSize=(#Size#*11)
StringAlign=Center
FontFace=Segoe UI
FontColor=255,255,255
AntiAlias=1
Text=The problem is :#CRLF#ToolTipText is also visible#CRLF#out of container

[MeterCont]
Meter=Shape
Group=Lang
Shape=Rectangle (#Size#*7),(#Size#*7),(#Size#*188),(#Size#*49),(#Size#*2) | StrokeWidth 0
MouseScrollDownAction=[!SetVariable Slide (Clamp((#Slide#+(#Size#*12.5)),0,(#Size#*350)))][!UpdateMeter * ][!Redraw]
MouseScrollUpAction=[!SetVariable Slide (Clamp((#Slide#-(#Size#*12.5)),0,(#Size#*350)))][!UpdateMeter * ][!Redraw]
MouseOverAction=[!SetVariable Tool "0"][!UpdateMeterGroup "Tooltips"]
MouseLeaveAction=[!SetVariable Tool "1"][!UpdateMeterGroup "Tooltips"]
DynamicVariables=1

[Meter1]
Meter=STRING
MeterStyle=StringStyle
X=(#Size#*100)
Y=(#Size#*6-#Slide#)
H=(#Size#*50)
W=(#Size#*200)
FontEffectColor=0,0,0
SolidColor=180,180,180
Text=One
TooltipText=First

[Meter2]
Meter=STRING
MeterStyle=StringStyle
X=(#Size#*100)
Y=(#Size#*50)r
H=(#Size#*50)
W=(#Size#*200)
FontEffectColor=255,0,0
SolidColor=20,20,20
Text=Two
TooltipText=Second

[Meter3]
Meter=STRING
MeterStyle=StringStyle
X=(#Size#*100)
Y=(#Size#*50)r
H=(#Size#*50)
W=(#Size#*200)
FontEffectColor=0,0,255
SolidColor=180,180,180
Text=Three
TooltipText=Third

[Meter4]
Meter=STRING
MeterStyle=StringStyle
X=(#Size#*100)
Y=(#Size#*50)r
H=(#Size#*50)
W=(#Size#*200)
FontEffectColor=255,255,0
SolidColor=20,20,20
Text=Four
TooltipText=Fourth

[Meter5]
Meter=STRING
MeterStyle=StringStyle
X=(#Size#*100)
Y=(#Size#*50)r
H=(#Size#*50)
W=(#Size#*200)
FontEffectColor=0,0,0
SolidColor=180,180,180
Text=Five
TooltipText=Fifth

[Meter6]
Meter=STRING
MeterStyle=StringStyle
X=(#Size#*100)
Y=(#Size#*50)r
H=(#Size#*50)
W=(#Size#*200)
FontEffectColor=255,0,0S
olidColor=20,20,20
Text=Six
TooltipText=Sixth

[Meter7]
Meter=STRING
MeterStyle=StringStyle
X=(#Size#*100)
Y=(#Size#*50)r
H=(#Size#*50)
W=(#Size#*200)
FontEffectColor=0,0,255
SolidColor=180,180,180
Text=Seven
TooltipText=Seventh

[Meter8]
Meter=STRING
MeterStyle=StringStyle
X=(#Size#*100)
Y=(#Size#*50)r
H=(#Size#*50)
W=(#Size#*200)
FontEffectColor=255,255,0
SolidColor=20,20,20
Text=Eight
TooltipText=Eighth
The magic is related to the Tool variable, which normally is 1 (accordingly the tooltips are hidden), but when hovering the mouse over the visible part of the meters (in fact over the container meter, named here [MeterCont]), this variable becomes 0, letting the tooltip to be shown.
Great idea and thank you again. Great job.