It is currently March 28th, 2024, 10:35 am

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

Get help with creating, editing & fixing problems with skins
eggy
Posts: 14
Joined: February 24th, 2017, 7:17 pm

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

Post 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.
Last edited by eggy on February 26th, 2017, 12:40 pm, edited 1 time in total.
User avatar
fonpaolo
Moderator
Posts: 1387
Joined: April 11th, 2013, 8:08 pm
Location: Italy
Contact:

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

Post 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.
User avatar
balala
Rainmeter Sage
Posts: 16109
Joined: October 11th, 2010, 6:27 pm
Location: Gheorgheni, Romania

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

Post 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
User avatar
balala
Rainmeter Sage
Posts: 16109
Joined: October 11th, 2010, 6:27 pm
Location: Gheorgheni, Romania

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

Post 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.
User avatar
balala
Rainmeter Sage
Posts: 16109
Joined: October 11th, 2010, 6:27 pm
Location: Gheorgheni, Romania

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

Post 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.
User avatar
jsmorley
Developer
Posts: 22628
Joined: April 19th, 2009, 11:02 pm
Location: Fort Hunt, Virginia, USA

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

Post 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.
eggy
Posts: 14
Joined: February 24th, 2017, 7:17 pm

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

Post 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=
eggy
Posts: 14
Joined: February 24th, 2017, 7:17 pm

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

Post 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=
User avatar
balala
Rainmeter Sage
Posts: 16109
Joined: October 11th, 2010, 6:27 pm
Location: Gheorgheni, Romania

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

Post 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.
eggy
Posts: 14
Joined: February 24th, 2017, 7:17 pm

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

Post 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"]
Post Reply