It is currently April 28th, 2024, 6:03 pm

Issues with re-appearing Meters after using HideMeter

Get help with creating, editing & fixing problems with skins
User avatar
Chrotesque
Posts: 6
Joined: May 31st, 2012, 10:55 pm
Location: France

Issues with re-appearing Meters after using HideMeter

Post by Chrotesque »

Hey!

So I've been working on a skin recently and wanted the functionality to collapsing and expanding the entire skin by clicking on a certain symbol.

Now I've run into two issues here.

This is the skin: click me!
As you can see I've got two issues essentially. First one is with collapsing the skin. The arrow (icon_collapse with the hoverversion icon_collapse_h) does not disappear with the rest of the skin and almost the same issue exists with right clicking the arrow to get to the config mode. The arrow pops up once again even though it is supposed to hide.

This is the code for expanding:

Code: Select all

[icon_start]
...
LeftMouseDownAction=!Execute [!HideMeter icon_start][!ToggleMeterGroup BarIcons]
This is the code for collapsing:

Code: Select all

[icon_collapse_h]
...
LeftMouseDownAction=!Execute [!HideMeterGroup BarIcons][!HideMeterGroup BarIcons_hover][!ShowMeter icon_start]
Broken down into the essentials this is the entire code:

Code: Select all

[Rainmeter]
Update=100
[Variables]
Skin=Chrotesquian_2

[icon_start]
Meter=IMAGE
ImageName=start.png
Path="#ROOTCONFIGPATH#\img\"
X=114
Y=0
LeftMouseDownAction=!Execute [!HideMeter icon_start][!ToggleMeterGroup BarIcons]

[bar]
Group=BarIcons
Meter=IMAGE
ImageName=bar.png
Path="#ROOTCONFIGPATH#\img\"
X=0
Y=0
Hidden=1

[icon_config]
Meter=IMAGE
ImageName=config.png
Path="#ROOTCONFIGPATH#\img\"
X=131
Y=5
Hidden=1
MouseOverAction=!Execute [!ShowMeter icon_config_h][!HideMeter icon_config]
MouseLeaveAction=!Execute [!HideMeter icon_config_h][!ShowMeter icon_config]

[icon_collapse]
Group=BarIcons
Meter=IMAGE
ImageName=arrow.png
Path="#ROOTCONFIGPATH#\img\"
X=128
Y=0
Hidden=1
MouseOverAction=!Execute [!ShowMeter icon_collapse_h][!HideMeter icon_collapse]
MouseLeaveAction=!Execute [!HideMeter icon_collapse_h][!ShowMeter icon_collapse]

[icon_collapse_h]
Group=BarIcons_hover
Meter=IMAGE
ImageName=arrow_h.png
Path="#ROOTCONFIGPATH#\img\"
X=131
Y=5
Hidden=1
LeftMouseDownAction=!Execute [!HideMeterGroup BarIcons][!HideMeterGroup BarIcons_hover][!HideMeter icon_collapse][!HideMeter icon_collapse_h][!ShowMeter 

icon_start]
RightMouseUpAction=!Execute [!HideMeter icon_collapse_h][!HideMeter icon_collapse][!ShowMeter icon_config]
I am using a few more meters for all the other icons of course but as those are not directly affected I decided to cut those out of the code.

As stated earlier I can't figure out why this is happening. I say hide and it decides to stay every time. :(
I surely must be doing something terribly wrong and just can't see it.

Kind regards,
Chrotesque

Edit: I do realize the config-icon is terribly out of place and not aligned at all, I didn't bother due to the issue at hand to be honest!
User avatar
jsmorley
Developer
Posts: 22631
Joined: April 19th, 2009, 11:02 pm
Location: Fort Hunt, Virginia, USA

Re: Issues with re-appearing Meters after using HideMeter

Post by jsmorley »

If you can zip up and post the entire skin folder including images and host it on http://mediafire.com or somewhere it will be a lot easier to test.
User avatar
Chrotesque
Posts: 6
Joined: May 31st, 2012, 10:55 pm
Location: France

Re: Issues with re-appearing Meters after using HideMeter

Post by Chrotesque »

User avatar
jsmorley
Developer
Posts: 22631
Joined: April 19th, 2009, 11:02 pm
Location: Fort Hunt, Virginia, USA

Re: Issues with re-appearing Meters after using HideMeter

Post by jsmorley »

I'm not 100% sure yet, but I think you may have found a reasonably serious bug. Let me keep testing for a bit.
User avatar
Chrotesque
Posts: 6
Joined: May 31st, 2012, 10:55 pm
Location: France

Re: Issues with re-appearing Meters after using HideMeter

Post by Chrotesque »

I myself tested this now with my previous installation beta 2.3 r1349, the newest beta 2.3 r1406 and the latest stable release 2.2, its the same with all the versions so far.
User avatar
jsmorley
Developer
Posts: 22631
Joined: April 19th, 2009, 11:02 pm
Location: Fort Hunt, Virginia, USA

Re: Issues with re-appearing Meters after using HideMeter

Post by jsmorley »

Chrotesque wrote:I myself tested this now with my previous installation beta 2.3 r1349, the newest beta 2.3 r1406 and the latest stable release 2.2, its the same with all the versions so far.
This may have been there for a long time. What I am seeing is that when you use !HideMeterGroup to hide your meters and put [icon_start] back, the meters (the bar, the icons and the collapse arrow) are being hidden, but the MouseOverAction and MouseLeaveAction associated with [icon_collapse] does not seem to be also "hidden", and so when you hover over what is now [icon_start], it is bringing in those "collapse" icons, which is causing the visual weirdness and the loss of functionality.

Let me poke a bit further, just in case it is some flaw in your (and now my) logic as to the flow of this that is causing it.
User avatar
Chrotesque
Posts: 6
Joined: May 31st, 2012, 10:55 pm
Location: France

Re: Issues with re-appearing Meters after using HideMeter

Post by Chrotesque »

I am way too tired to think straight so I'll better go sleepin' soon but I guess you have already tested without the hover effect and found that everything works just perfect without the hover effects and therefore the leftmousedownactions triggered from the hover-icons instead of the icons themselves.

One thing to note is that I had it working in the beginning, hover effect and collapsing without an issue. However I haven't been able to reproduce that.
User avatar
jsmorley
Developer
Posts: 22631
Joined: April 19th, 2009, 11:02 pm
Location: Fort Hunt, Virginia, USA

Re: Issues with re-appearing Meters after using HideMeter

Post by jsmorley »

Unless I am missing something, I think this is confirmed. If I change your code to:

Code: Select all

[Rainmeter]
Update=100
DynamicWindowSize=1
Author= Chrotesque | comamind.deviantart.com, chrotesque.com, comamind.de

;Metadata added by RainBrowser
;http://rainmeter.net/RainWiki/index.php?title=Rainmeter_101#.5BMetadata.5D

[Metadata]
Name=Chrotesquian | Middle Bar (C-Sign)
Version=1.0
License=Creative Commons BY-NC-ND 3.0 (http://creativecommons.org/licenses/by-nc-nd/3.0/)

;End of added Metadata

@include1=_vars.ini

;----------------------------------------------------------------> [ START ]

[icon_start]
Meter=IMAGE
ImageName=start.png
Path="#ROOTCONFIGPATH#\img\"
X=114
Y=0
LeftMouseDownAction=!Execute [!HideMeter icon_start][!ShowMeterGroup BarIcons][!SetOption icon_collapse MouseOverAction """!Execute [!ShowMeter icon_collapse_h][!HideMeter icon_collapse]"""][!SetOption icon_collapse MouseLeaveAction """!Execute [!HideMeter icon_collapse_h][!ShowMeter icon_collapse]"""]

;----------------------------------------------------------------> [ BAR ] 

[bar]
Group=BarIcons
Meter=IMAGE
ImageName=bar.png
Path="#ROOTCONFIGPATH#\img\"
X=0
Y=0
Hidden=1

;----------------------------------------------------------------> [ ICONS NORMAL ] 

[icon_collapse]
Group=BarIcons
Meter=IMAGE
ImageName=arrow.png
Path="#ROOTCONFIGPATH#\img\"
X=128
Y=0
Hidden=1
MouseOverAction=!Execute [!ShowMeter icon_collapse_h][!HideMeter icon_collapse]
MouseLeaveAction=!Execute [!HideMeter icon_collapse_h][!ShowMeter icon_collapse]

[icon_config]
Meter=IMAGE
ImageName=config.png
Path="#ROOTCONFIGPATH#\img\"
X=131
Y=5
Hidden=1
MouseOverAction=!Execute [!ShowMeter icon_config_h][!HideMeter icon_config]
MouseLeaveAction=!Execute [!HideMeter icon_config_h][!ShowMeter icon_config]

[icon_system]
Group=BarIcons
Meter=IMAGE
ImageName=system.png
Path="#ROOTCONFIGPATH#\img\"
X=25
Y=1
Hidden=1
MouseOverAction=!ShowMeter icon_system_h
MouseLeaveAction=!HideMeter icon_system_h

[icon_apps]
Group=BarIcons
Meter=IMAGE
ImageName=apps.png
Path="#ROOTCONFIGPATH#\img\"
X=60
Y=3
Hidden=1
MouseOverAction=!ShowMeter icon_apps_h
MouseLeaveAction=!HideMeter icon_apps_h

[icon_weather]
Group=BarIcons
Meter=IMAGE
ImageName=weather.png
Path="#ROOTCONFIGPATH#\img\"
X=195
Y=2
Hidden=1
MouseOverAction=!ShowMeter icon_weather_h
MouseLeaveAction=!HideMeter icon_weather_h


[icon_notepad]
Group=BarIcons
Meter=IMAGE
ImageName=notepad.png
Path="#ROOTCONFIGPATH#\img\"
X=250
Y=1
Hidden=1
MouseOverAction=!ShowMeter icon_notepad_h
MouseLeaveAction=!HideMeter icon_notepad_h

;----------------------------------------------------------------> [ ICONS HOVER ] 

[icon_collapse_h]
Group=BarIcons_hover
Meter=IMAGE
ImageName=arrow_h.png
Path="#ROOTCONFIGPATH#\img\"
X=131
Y=5
Hidden=1
LeftMouseDownAction=!Execute [!HideMeterGroup BarIcons][!HideMeterGroup BarIcons_hover][!SetOption icon_collapse MouseOverAction ""][!SetOption icon_collapse MouseLeaveAction ""][!ShowMeter icon_start]
RightMouseUpAction=!Execute [!HideMeter icon_collapse_h][!HideMeter icon_collapse][!ShowMeter icon_config]

[icon_config_h]
Group=BarIcons_hover
Meter=IMAGE
ImageName=config_h.png
Path="#ROOTCONFIGPATH#\img\"
X=131
Y=5
Hidden=1

[icon_system_h]
Group=BarIcons_hover
Meter=IMAGE
ImageName=system_h.png
Path="#ROOTCONFIGPATH#\img\"
X=28
Y=4
Hidden=1

[icon_apps_h]
Group=BarIcons_hover
Meter=IMAGE
ImageName=apps_h.png
Path="#ROOTCONFIGPATH#\img\"
X=64
Y=5
Hidden=1

[icon_weather_h]
Group=BarIcons_hover
Meter=IMAGE
ImageName=weather_h.png
Path="#ROOTCONFIGPATH#\img\"
X=195
Y=4
Hidden=1

[icon_notepad_h]
Group=BarIcons_hover
Meter=IMAGE
ImageName=notepad_h.png
Path="#ROOTCONFIGPATH#\img\"
X=252
Y=2
Hidden=1
Which is using !SetOption to specifically remove the MouseOver and MouseLeave actions from the [icon_collapse] meter when you click on [icon_collapse_h], then specifically putting them back when you click on [icon_start], it seems to work fine. I did not do the same with the "config" meters that appear to be similar, but until we figure this out and either fix it or see some logic flaw I am missing, you would want to do that too.

There are other ways to approach this skin, mostly using !SetOption to just toggle ImageName on meters instead of using all this "hide" and "show", but this does feel like a bug to me, and I'd like to get one or more of the other guys to take a look.
User avatar
jsmorley
Developer
Posts: 22631
Joined: April 19th, 2009, 11:02 pm
Location: Fort Hunt, Virginia, USA

Re: Issues with re-appearing Meters after using HideMeter

Post by jsmorley »

Here is a very simple skin that demonstrates the problem. I do think this is a bug.

Code: Select all

[Rainmeter]
Update=100
DynamicWindowSize=1

[MeterOne]
Meter=Image
X=0
Y=0
W=25
H=25
SolidColor=255,255,255,255
LeftMouseDownAction=[!HideMeter MeterOne][!ShowMeterGroup ShowMe]

[MeterTwo]
Meter=Image
Group=ShowMe
X=0
Y=0
W=25
H=25
SolidColor=255,0,255,255
MouseOverAction=[!HideMeter MeterTwo][!ShowMeter MeterTwo_over]
MouseLeaveAction=[!HideMeter MeterTwo_over][!ShowMeter MeterTwo]
Hidden=1

[MeterTwo_over]
Meter=Image
Group=ShowMe
X=0
Y=0
W=25
H=25
SolidColor=255,255,0,255
LeftMouseDownAction=[!HideMeterGroup ShowMe][!ShowMeter MeterOne]
Hidden=1
User avatar
Chrotesque
Posts: 6
Joined: May 31st, 2012, 10:55 pm
Location: France

Re: Issues with re-appearing Meters after using HideMeter

Post by Chrotesque »

Thanks for your help jsmorley!