Page 1 of 3

[SOLVED] MouseLeaveAction not working with Honeycomb? (Fade-in and out)

Posted: February 24th, 2017, 7:25 pm
by eggy
Hey there!

First off, I am very new to Rainmeter, so it may well be a very easy fix.
What I am trying to do is have one of my honeycombs "folder" hidden unless my mouse is currently over it.

The probelm seems to be that, once it is Hidden, and my mouse leaves the group, the "folder" doesn't reappear.

Here is a video example:
https://i.gyazo.com/2f83375451e4ff981a8b197cc88ecbbe.mp4

Is this because it becomes inactive? And if so, how do I fix this? :)

This is the file:
_____________________________
[folder]
Meter=Image
ImageName=#@#Images\folder.png
H=90
LeftMouseUpAction=["folder.exe"]

[Rainmeter]
Update=1000
Group=folder
MouseOverAction=[!ShowFadeGroup "folder"]
MouseLeaveAction=[!HideFadeGroup "folder"]

...
____________________________

and here are the settings:

Image


Thanks a lot for reading this!

Best,
Eggy

EDIT:
_________________________
This is how to make you honeycomb icons fade in and out, specail thanks to @balala
balala wrote:
Here is a short method to use a fade effect, using the ActionTimer plugin:

Code: Select all

[Rainmeter]
Update=1000
Group=folder
MouseOverAction=[!CommandMeasure MeasureSlide "Stop 2"][!CommandMeasure MeasureSlide "Execute 1"]
MouseLeaveAction=[!CommandMeasure MeasureSlide "Stop 1"][!CommandMeasure MeasureSlide "Execute 2"]

[Variables]
Alpha=255
U=[!UpdateMeasure "MeasureSlide"][!UpdateMeter "folder"][!Redraw]

[MeasureSlide]
Measure=Plugin
Plugin=ActionTimer
Group=Sliders
ActionList1=Repeat FadeIn,20,25
FadeIn=[!SetVariable Alpha "(Clamp(#Alpha#+10,1,255))"]#U#
ActionList2=Repeat FadeOut,20,25
FadeOut=[!SetVariable Alpha "(Clamp(#Alpha#-10,1,255))"]#U#
DynamicVariables=1

[folder]
Meter=Image
ImageName=#@#Images\folder.png
H=90
LeftMouseUpAction=["folder.exe"]
ImageAlpha=#Alpha#
DynamicVariables=1
In the first moment, the value of the Alpha variable is 255. This will determine the opacity of the image. 255 means fully opaque.
When you're hovering the mouse over the skin, the FadeIn option of the [MeasureSlide] measure will be executed, which should increase the value of the Alpha variable. But it won't, because its value is already 255, which is the maximum possible.
But when you're leaving the skin, the FadeOut option will be executed, decreasing the value of the variable and implicitly fading out the image. When you1re hovering again the mouse over the skin, the variable will be increased and the image will fade in (and so on).
The important thing here is to set the value of the Alpha variable and with this to fade in and out the image.

Re: MouseLeaveAction not working with Honeycomb? (Nice images!)

Posted: February 24th, 2017, 8:48 pm
by fonpaolo
I'm sorry, but the code you posted, if it's as is, doesn't make much sense.

If you're trying to hide/show a single skin (folder.ini), you need to use [!HideFade "RootFolder\Folder" "Folder.ini" and [!ShowFade "RootFolder\Folder" "Folder.ini"]

Note: I'm using "RootFolder" since I can't see the name in your image. I suppose it's Honeycomb...

Another suggestion, if that's all the code of folder.ini, you can use Update=-1 since there's nothing there which needs to be updated constantly.

Re: MouseLeaveAction not working with Honeycomb? (Nice images!)

Posted: February 24th, 2017, 9:12 pm
by balala
fonpaolo wrote:If you're trying to hide/show a single skin (folder.ini), you need to use [!HideFade "RootFolder\Folder" "Folder.ini" and [!ShowFade "RootFolder\Folder" "Folder.ini"]
Sorry fonpaolo, this is wrong.
Neither the !HideFade and neither the !ShowFade bang doesn't need the File parameter, just the Config: [!HideFade "RootFolder\Folder"] and [!ShowFade "RootFolder\Folder"]
https://docs.rainmeter.net/manual/bangs/#ShowHideToggleFade

Re: MouseLeaveAction not working with Honeycomb? (Nice images!)

Posted: February 24th, 2017, 9:16 pm
by balala
eggy wrote:The probelm seems to be that, once it is Hidden, and my mouse leaves the group, the "folder" doesn't reappear.
The problem is that when you're leaving the skin, it is hidden. But you can't hover the mouse over a hidden skin, that's why it's never shown again.

Re: MouseLeaveAction not working with Honeycomb? (Nice images!)

Posted: February 24th, 2017, 9:23 pm
by balala
The only solution would be to not hide the skin itself, just make the appropriate meter(s) almost invisible. In such cases, because those meters aren't completely hidden, they will interact with your mouse, but practically you can't see them with the naked eye.
For further help, please post the whole code of your skin.

Re: MouseLeaveAction not working with Honeycomb? (Nice images!)

Posted: February 24th, 2017, 10:36 pm
by jsmorley
You can use AlphaValue on the skin itself.

https://docs.rainmeter.net/manual/settings/skin-sections/#AlphaValue

That value can be changed with https://docs.rainmeter.net/manual/bangs/#SetTransparency

Be sure to set the value at at least "1" to enable mouse detection.

Re: MouseLeaveAction not working with Honeycomb? (Nice images!)

Posted: February 24th, 2017, 11:57 pm
by eggy
balala wrote:The only solution would be to not hide the skin itself, just make the appropriate meter(s) almost invisible. In such cases, because those meters aren't completely hidden, they will interact with your mouse, but practically you can't see them with the naked eye.
For further help, please post the whole code of your skin.

Thanks a lot for all your help, I really appreciate it.

This is the full code, it is a honeycomb:

[folder]
Meter=Image
ImageName=#@#Images\folder.png
H=90
LeftMouseUpAction=["folder.exe"]

[Rainmeter]
Update=1000
Group=folder
MouseOverAction=[!ShowFadeGroup "folder"]
MouseLeaveAction=[!HideFadeGroup "folder"]

[Metadata]
Name=folder
Author=APIUM
Information=
License=
Version=

Re: MouseLeaveAction not working with Honeycomb? (Nice images!)

Posted: February 25th, 2017, 12:02 am
by eggy
jsmorley wrote:You can use AlphaValue on the skin itself.

https://docs.rainmeter.net/manual/settings/skin-sections/#AlphaValue

That value can be changed with https://docs.rainmeter.net/manual/bangs/#SetTransparency

Be sure to set the value at at least "1" to enable mouse detection.
Thanks for your help :)

I am not sure this would work to make a fade, would it haha

[folder]
Meter=Image
ImageName=#@#Images\folder.png
H=90
LeftMouseUpAction=["folder.exe"]

[Rainmeter]
Update=1000
Group=folder
MouseOverAction=[!SetTransparency "+5" "folder"]
MouseLeaveAction=[!SetTransparency "-5" "folder"]

[Metadata]
Name=folder
Author=APIUM
Information=
License=
Version=

Re: MouseLeaveAction not working with Honeycomb? (Nice images!)

Posted: February 25th, 2017, 7:21 am
by balala
jsmorley's idea is good, but with that method, a fade effect won't work (see below).
eggy wrote:[Rainmeter]
...
MouseOverAction=[!SetTransparency "+5" "folder"]
MouseLeaveAction=[!SetTransparency "-5" "folder"]
On the other hand, you can't add or extract something to/from the current value of the transparency, using positive or negative value, as you did. The transparency will be set to the value used in the !SetTransparency bang. And if you want to set the transparency of the current skin, you don't have to use the second parameter (in this case "folder").
So, replace the MouseOverAction and MouseLeaveAction options into the [Rainmeter] section, to the following ones:

Code: Select all

[Rainmeter]
...
MouseOverAction=[!SetTransparency "255"]
MouseLeaveAction=[!SetTransparency "1"]
This won't give a fade effect, it just will make the skin visible / invisible instantly.
For a fade effect, this method won't work, because the dynamic variables are not supported by the [Rainmeter] section, they can't be used there. But if you'd like it, let me (us) know, because, even if it's a bit harder, it's not impossible.

Re: MouseLeaveAction not working with Honeycomb? (Nice images!)

Posted: February 25th, 2017, 12:50 pm
by eggy
jsmorley wrote:You can use AlphaValue on the skin itself.
Be sure to set the value at at least "1" to enable mouse detection.
balala wrote:jsmorley's idea is good, but with that method, a fade effect won't work (see below).
MouseOverAction=[!SetTransparency "255"]
MouseLeaveAction=[!SetTransparency "1"][/code]
This won't give a fade effect, it just will make the skin visible / invisible instantly.
For a fade effect, this method won't work, because the dynamic variables are not supported by the [Rainmeter] section, they can't be used there. But if you'd like it, let me (us) know, because, even if it's a bit harder, it's not impossible.

It looks quite okay, but would be epic with a fade haha. :)

- I made a few custom honeycomb skins and set the minimum alpha a bit higher so it is somewhat still visable, it looks much nicer.

Here is an example of it at the moment:
https://i.gyazo.com/03a47c0a29e385a4683c9d5e92e52039.mp4

And here is a screenshot:
Image

also is there a way on startup to set the transparancy?

Code: Select all

MouseLeaveAction=[!SetTransparency "50"]