It is currently April 19th, 2024, 9:28 pm

Click-through but hover-over (or the reverse)

Get help with creating, editing & fixing problems with skins
Orillion
Posts: 2
Joined: May 21st, 2021, 3:15 pm

Click-through but hover-over (or the reverse)

Post by Orillion »

Hello! I'm trying to fix a particular bugbear I've had with my taskbar customizations by using rainmeter to require a click to activate it. My initial attempt involved simply using a long bar and this code (It's just cobbled together out of one of the included skins since it should, in theory, be simple and for personal use besides):

Code: Select all

[meterTitle]
Meter=String
MeterStyle=styleTitle
BackgroundMode=2
BackgroundMargins=0,0,0,0
SolidColor=0,32,255,128
X=0
Y=0
W=2048
H=2
LeftMouseUpAction=["C:\Toolkit\Toggle Hide Taskbar.lnk"]
The taskbar itself is set to auto-hide, since that's the only way that I know of to let windows use the entire screen, and the shortcut is a nircmd command which toggles a registry setting which can fully hide the taskbar. The problem is that the line also happens to cover the pixel that you need to hover over to make the taskbar show up in the first place. I tried having Rainmeter hide the bar on hover, but that makes it kind of hard to click when I want it, and the time to fade out is kind of long anyway.

The second approach I tried, to similarly disappointing results, is to add a second meter with a MouseLeaveAction command to hide the taskbar, and simply making the initial bar only show the taskbar. This would allow me to show the taskbar by clicking the bar, and then make it automatically hard-hide itself by leaving the taskbar area, easily close enough to what I want.

In this case I ran into the exact opposite problem. If the second element is completely transparent then I can click through it just fine, but it also doesn't activate the MouseLeaveAction command. If I set the opacity to 1 so it's close enough to transparent, the MouseLeaveAction works just fine, but I can't actually click the taskbar through the element. I tested the second part with the click-through option ticked in Rainmeter as well, to see if making it a different skin would work, but it didn't seem to make a difference.

Are these two variables inextricably linked, or is there some solution for this?
User avatar
balala
Rainmeter Sage
Posts: 16147
Joined: October 11th, 2010, 6:27 pm
Location: Gheorgheni, Romania

Re: Click-through but hover-over (or the reverse)

Post by balala »

Not sure I entirely follow what are you talking about, but if I'm correct on what am I thinking, I probably would try to move the [meterTitle] meter a little bit down, to have a few pixels space between the upper edge of screen and the upper edge of meter. I am talking about replacing the Y option of the meter with something like Y=5, Y=10 or something similar (you have to give it a few tries in order to get the best value) - supposing the position of Taskbar is set to top, right?. This way there will be a small space between the skin and the edge of screen, where you can hovering the mouse to reveal the taskbar.
Sorry if this is not what you were talking about.
Orillion
Posts: 2
Joined: May 21st, 2021, 3:15 pm

Re: Click-through but hover-over (or the reverse)

Post by Orillion »

balala wrote: May 21st, 2021, 4:51 pm Not sure I entirely follow what are you talking about, but if I'm correct on what am I thinking, I probably would try to move the [meterTitle] meter a little bit down, to have a few pixels space between the upper edge of screen and the upper edge of meter. I am talking about replacing the Y option of the meter with something like Y=5, Y=10 or something similar (you have to give it a few tries in order to get the best value) - supposing the position of Taskbar is set to top, right?. This way there will be a small space between the skin and the edge of screen, where you can hovering the mouse to reveal the taskbar.
Sorry if this is not what you were talking about.
I mean, that works, technically, but then it results in me needing to be extremely precise to actually click the thing, defeating the purpose entirely.

The point is essentially to have it right up against the edge of the screen so I can quickly click the top (no precision needed, like a good UI) to summon the taskbar when I want it, but not, for example, when I'm going to quickly click to close an application (because with the full screen space used, the close button gets overlapped with the right edge of the tray area when the taskbar opens)

It seems I may be forced to use the alternative approach: intentionally block the taskbar in the upper-right of the screen instead. It's not a perfect solution, but if I can't separate the elements' response to clicking and hovering commands I think it's what I've got.

Thanks for your help, though
User avatar
death.crafter
Rainmeter Sage
Posts: 1399
Joined: April 24th, 2021, 8:13 pm

Re: Click-through but hover-over (or the reverse)

Post by death.crafter »

Orillion wrote: May 21st, 2021, 6:37 pm I mean, that works, technically, but then it results in me needing to be extremely precise to actually click the thing, defeating the purpose entirely.

The point is essentially to have it right up against the edge of the screen so I can quickly click the top (no precision needed, like a good UI) to summon the taskbar when I want it, but not, for example, when I'm going to quickly click to close an application (because with the full screen space used, the close button gets overlapped with the right edge of the tray area when the taskbar opens)

It seems I may be forced to use the alternative approach: intentionally block the taskbar in the upper-right of the screen instead. It's not a perfect solution, but if I can't separate the elements' response to clicking and hovering commands I think it's what I've got.

Thanks for your help, though
I don't know if I understand correctly but this might help:

If your ahk activates taskbar when hovered over the mentioned skin then you might want to decrease the width of the skin so that it doesn't cover the window controls if you know what I mean.
from the Realm of Death