It is currently October 21st, 2021, 3:13 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

Tooltip on not visible meter

Post by balala »

Hi everybody,

A new question arose while was working on a skin.
Suppose there are two meters, both having Tooltips defined. There also is a container, which let visible only the first meter. Also suppose there is a solid background (another meter for instance, but might be a SolidColor on the [Rainmeter] section as well).
Even if the second meter is not visible (being outside of the container), when hovering the mouse over the place where it should be (is), the Tooltip is shown. If there is no solid background, the Tooltip is not shown.
Please take a look to the following example:

Code: Select all

[Rainmeter]
Update=1000
DynamicWindowSize=1
AccurateText=1

[StringStyle]
X=0
Padding=15,5,15,5
FontColor=220,220,220
FontEffectColor=0,0,0
StringEffect=Shadow
SolidColor=0,0,0,1
FontSize=18
FontFace=Segoe UI
StringStyle=BOLD
StringAlign=Left
AntiAlias=1
Container=MeterContainer

[MeterBackground]
Meter=Shape
X=1
Y=1
Shape=Rectangle 0,0,76,94,5 | Extend MyModifiers
MyModifiers=Fill Color 0,0,0,120 | StrokeWidth 2 | Stroke Color 46,115,31,255

[MeterContainer]
Meter=Image
SolidColor=250,240,0
X=0
Y=0
W=76
H=42

[Meter1]
Meter=STRING
MeterStyle=StringStyle
Y=0
Text=One
TooltipText=First
LeftMouseUpAction=[!ToggleMeter "MeterBackground"][!Redraw]

[Meter2]
Meter=STRING
MeterStyle=StringStyle
Y=10R
Text=Two
TooltipText=Second
As you can see, this code has two String meters ([Meter1] displaying "One" and [Meter2] displaying "Two"), each with its own Tooltip ("First" and "Second" accordingly). The defined [MeterContainer] let visible only the [Meter1] meter, [Meter2] being outside of the container meter is not visible. Obviously, [MeterBackground] is the solid background. While [MeterBackground] is visible the tooltips of both meters ([Meter1] and [Meter2]) are shown, when hovering the mouse over the meters. If you click the first meter ([Meter1], displaying "One"), [MeterBackground] is hidden (on next click it is bring back) and the Tooltip of [Meter2] is not shown anymore (while the background is not visible).
Is normal to show the Tooltip of a not-visible meter? Is there any solution to fix this?

Thank you in advance.
You do not have the required permissions to view the files attached to this post.
User avatar
death.crafter
Posts: 1056
Joined: April 24th, 2021, 8:13 pm

Re: Tooltip on not visible meter

Post by death.crafter »

balala wrote: September 6th, 2021, 8:22 pm


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.
from the Realm of Death
My Current Desktop
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.
I don't think this is what am I waiting for. In my opinion the Tooltip of a not visible meter should not react to the mouse hovering. Like a hidden meter, whose Tooltip is not showing up.
Question is if this is how the container has to work or this is a bug.
User avatar
jsmorley
Developer
Posts: 22372
Joined: April 19th, 2009, 11:02 pm
Location: Fort Hunt, Virginia, USA

Re: Tooltip on not visible meter

Post by jsmorley »

I can confirm that TooltipText on a "container" meter is reacted to. I could certainly argue that this shouldn't be the case. Let us look into it.

The way to look at this I think is not that the "container" is "hidden", it certainly isn't. The size, shape and transparency of the container meter is key to the functionality. The way I view it is that both the "container" and the "content" meters are combined into a new "virtual" meter that is a blending of the two.

In the meantime, It doesn't really make sense to me to put a tootip on a "container" meter. Can you explain why you would want that?
User avatar
Active Colors
Moderator
Posts: 870
Joined: February 16th, 2012, 3:32 am
Location: Berlin, Germany

Re: Tooltip on not visible meter

Post by Active Colors »

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.
The invisible part of the Meter2 strangely reacts to the mouse by showing the tooltip when the MeterBackground is visible. When MeterBackground is hidden then the invisible part of Meter2 does not populate the tooltip.

Slightly modified the example from the above to demonstrate the issue:
GIF.gif
You do not have the required permissions to view the files attached to this post.
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, 11:39 am In the meantime, It doesn't really make sense to me to put a tootip on a "container" meter. Can you explain why you would want that?
No, I can't, because not this has been done. The Tooltip are on "normal" meters (in my above code [Meter1] and [Meter2]), the container ([MeterContainer]) doesn't have a Tooltip. The question was if the Tooltip of a contained meter, which is not visible, being outside of the visible part defined by the container, should be shown when hovering the mouse over the place where the (let's say invisible - not-visible or how to name it) meter resides.
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 »

Active Colors wrote: September 7th, 2021, 11:59 am The invisible part of the Meter2 strangely reacts to the mouse by showing the tooltip when the MeterBackground is visible. When MeterBackground is hidden then the invisible part of Meter2 does not populate the tooltip.
This was what I said as well.
User avatar
jsmorley
Developer
Posts: 22372
Joined: April 19th, 2009, 11:02 pm
Location: Fort Hunt, Virginia, USA

Re: Tooltip on not visible meter

Post by jsmorley »

Don't forget that the way the mouse is detected on all meters other than Shape is that if the mouse is within the W and H boundaries of the meter, and the pixel the mouse is over is "solid" for any reason, the mouse is detected. It's not about the contents of the meter, it's about the meter container defined by the W and H of the meter. So any "background" on a meter, any SolidColor on the meter, any meter behind it, or any skin background set in [Rainmeter] will make the meter detect the mouse on the entirety of the meter.

Mind you, I'm not entirely thrilled with this behavior, I'd prefer that all meters acted like Shape does, but it's kinda baked into the DNA of Rainmeter, and I would fear backwards compatibility issues if we start changing it.
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, 12:52 pm Don't forget that the way the mouse is detected on all meters other than Shape is that if the mouse is within the W and H boundaries of the meter, and the pixel the mouse is over is "solid" for any reason, the mouse is detected. It's not about the contents of the meter, it's about the meter container defined by the W and H of the meter. So any "background" on a meter, any SolidColor on the meter, any meter behind it, or any skin background set in [Rainmeter] will make the meter detect the mouse on the entirety of the meter.
Yep, you probably are right, however I'd have expected not to react if there is a solid background, but the meter having the Tooltip is not visible (not being contained into the solid / visible part of the container). At least this would have been my guess, before discovering what is going on.
jsmorley wrote: September 7th, 2021, 12:52 pm Mind you, I'm not entirely thrilled with this behavior, I'd prefer that all meters acted like Shape does, but it's kinda baked into the DNA of Rainmeter, and I would fear backwards compatibility issues if we start changing it.
Yes, right, probably doesn't worth to change this. No saying that is not even possible, I think (due to the backward compatibility).
User avatar
jsmorley
Developer
Posts: 22372
Joined: April 19th, 2009, 11:02 pm
Location: Fort Hunt, Virginia, USA

Re: Tooltip on not visible meter

Post by jsmorley »

balala wrote: September 7th, 2021, 1:03 pm Yep, you probably are right, however I'd have expected not to react if there is a solid background, but the meter having the Tooltip is not visible (not being contained into the solid / visible part of the container). At least this would have been my guess, before discovering what is going on.
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.