It is currently April 27th, 2024, 9:49 am

mouse action still works over an empty space

Get help with creating, editing & fixing problems with skins
User avatar
Yincognito
Rainmeter Sage
Posts: 7175
Joined: February 27th, 2015, 2:38 pm
Location: Terra Yincognita

Re: mouse action still works over an empty space

Post by Yincognito »

Kotofanchik wrote: March 19th, 2024, 3:10 am That is the problem
We managed to hide the icons, but the fact that they continue to take up space makes the skin ugly.
Relative positioning does not work as it should due to the occupied space.
If the relative positioning is used with the padding and the aforementioned IfMatch to hide missing icons as I described, it will in fact work as you expect it to, so I'm guessing you either didn't apply it properly, you didn't even try it, or you just prefer to do it the way you mentioned below (which won't work exactly like you think).
Kotofanchik wrote: March 19th, 2024, 3:31 am Do something like

IfMatch=^$
IfMatchAction=[W=0 H=0 X=0 Y=0]
IfNotMatchAction=[!ShowMeter "MeterAlertImageJ"]

Is this possible?
Of course it is, just use !SetOption bangs for each of those 4 coordinates:
https://docs.rainmeter.net/manual/bangs/#SetOption
For example:

Code: Select all

IfMatch=^$
IfMatchAction=[!SetOption MeterAlertImageJ W 0][!SetOption MeterAlertImageJ H 0][!SetOption MeterAlertImageJ X 0][!SetOption MeterAlertImageJ Y 0][!UpdateMeter *][!Redraw]
IfNotMatchAction=[!ShowMeter "MeterAlertImageJ"]
However, the reason why it won't do all that you want is that only by doing this you won't be able to know what X to set to each of the icons in the row without somehow keeping track of how many shown icons are before (or to the left of) the icon you're setting the X on. This is possible as well, but it involves setting some additional variable in the same IfMatches, to store how many shown icons are before the one you're setting the coordinates to, so that you can set the latter's X based on that.

That's why I said the method I mentioned earlier was easier, given that Rainmeter would automatically compute the proper coordinates via the relative positioning, and the padding will hide the gaps / spaces between icons when you hide the icons as well. You do as you wish though, it's your skin and you are in charge of it. ;-)
Profiles: Rainmeter ProfileDeviantArt ProfileSuites: MYiniMeterSkins: Earth
Kotofanchik
Posts: 95
Joined: March 15th, 2024, 7:30 pm

Re: mouse action still works over an empty space

Post by Kotofanchik »

Fine. I will try in every possible way and write what happens. :) Thank you.
Up
Option
X=0R
Y=0r
W=20
Padding=0,0,10,0
It worked
Kotofanchik
Posts: 95
Joined: March 15th, 2024, 7:30 pm

Re: mouse action still works over an empty space

Post by Kotofanchik »

Continuation. How can I open and close my sub-skin from the main skin? Open if there is at least one picture on the site, hide if no icon picture is found? There may be none of the icons on the site, or there may be several of them at once. There are probably about 40 of them in total. Sometimes I found seven at a time.
User avatar
balala
Rainmeter Sage
Posts: 16176
Joined: October 11th, 2010, 6:27 pm
Location: Gheorgheni, Romania

Re: mouse action still works over an empty space

Post by balala »

Kotofanchik wrote: March 19th, 2024, 3:31 am Is this possible?
If by the IfMatchAction=[W=0 H=0 X=0 Y=0] option you did mean to set the position and size of certain meter (most probably [MeterAlertImageJ], but I'm not sure), this can be done, however not the posted way. I assume the goal was to hide the meter (if you set its size to 0, it practically is hidden). You can hide the meter using the !HideMeter bang: IfMatchAction=[!HideMeter "MeterAlertImageJ"][!Redraw].
Did I misunderstood your intention? If I did, tell us please what would you like to achieve.
Kotofanchik
Posts: 95
Joined: March 15th, 2024, 7:30 pm

Re: mouse action still works over an empty space

Post by Kotofanchik »

balala wrote: March 19th, 2024, 7:27 pm If I did, tell us please what would you like to achieve.
I wanted to ensure that hidden meters did not take up space. Everything was done quite simply
as suggested
X=0R
.
Padding=0,0,10,0

Now a new step is needed. :D Hide the entire secondary skin if there is not a single icon on the site
Last edited by Kotofanchik on March 19th, 2024, 8:07 pm, edited 1 time in total.
User avatar
Yincognito
Rainmeter Sage
Posts: 7175
Joined: February 27th, 2015, 2:38 pm
Location: Terra Yincognita

Re: mouse action still works over an empty space

Post by Yincognito »

balala wrote: March 19th, 2024, 7:27 pm If by the IfMatchAction=[W=0 H=0 X=0 Y=0] option you did mean to set the position and size of certain meter (most probably [MeterAlertImageJ], but I'm not sure), this can be done, however not the posted way. I assume the goal was to hide the meter (if you set its size to 0, it practically is hidden). You can hide the meter using the !HideMeter bang: IfMatchAction=[!HideMeter "MeterAlertImageJ"][!Redraw].
Did I misunderstood your intention? If I did, tell us please what would you like to achieve.
Yeah, he also wanted to "hide" the gaps / spaces between the meters on the same "row", hence setting the meter position to "0" (well, that was just an example, he wanted to set them to a position that didn't account for the gaps before the said meters, which will remain if you only hide the meter and nothing else).
Profiles: Rainmeter ProfileDeviantArt ProfileSuites: MYiniMeterSkins: Earth
User avatar
Yincognito
Rainmeter Sage
Posts: 7175
Joined: February 27th, 2015, 2:38 pm
Location: Terra Yincognita

Re: mouse action still works over an empty space

Post by Yincognito »

Kotofanchik wrote: March 19th, 2024, 1:49 pm Fine. I will try in every possible way and write what happens. :) Thank you.
Up
Option
X=0R
Y=0r
W=20
Padding=0,0,10,0
It worked
Nice! :thumbup:
Kotofanchik wrote: March 19th, 2024, 2:57 pm Continuation. How can I open and close my sub-skin from the main skin? Open if there is at least one picture on the site, hide if no icon picture is found? There may be none of the icons on the site, or there may be several of them at once. There are probably about 40 of them in total. Sometimes I found seven at a time.
Which is the main skin? The one you have these icons on?
Profiles: Rainmeter ProfileDeviantArt ProfileSuites: MYiniMeterSkins: Earth
Kotofanchik
Posts: 95
Joined: March 15th, 2024, 7:30 pm

Re: mouse action still works over an empty space

Post by Kotofanchik »

Yincognito wrote: March 19th, 2024, 8:17 pm Which is the main skin? The one you have these icons on?
No. Secondary skin with alert icons. As planned, it should appear if there is at least one weather warning on the site. The main skin has standard icons for weather, temperature, etc. It is always displayed. And the secondary skin should appear in case of danger, storm, fire, flood, etc. and attract attention.
Last edited by Kotofanchik on March 19th, 2024, 8:25 pm, edited 1 time in total.
User avatar
balala
Rainmeter Sage
Posts: 16176
Joined: October 11th, 2010, 6:27 pm
Location: Gheorgheni, Romania

Re: mouse action still works over an empty space

Post by balala »

Kotofanchik wrote: March 19th, 2024, 7:44 pm I wanted to ensure that hidden meters did not take up space. Everything was done quite simply
as suggested
X=0R
.
Padding=0,0,10,0
Does it work as intended?
Kotofanchik wrote: March 19th, 2024, 7:44 pm Now a new step is needed. :D Hide the entire secondary skin if there is not a single icon on the site

Code: Select all

IfMatch=^$
IfMatchAction=[!HideFade "Config-Of-Secondary-Skin"]
IfNotMatchAction=[!showFade "Config-Of-Secondary-Skin"]
Hope you know what the Config-Of-Secondary-Skin does mean. If you don't, please let us know, to explain.
Kotofanchik
Posts: 95
Joined: March 15th, 2024, 7:30 pm

Re: mouse action still works over an empty space

Post by Kotofanchik »

balala wrote: March 19th, 2024, 8:25 pm Does it work as intended?
Yes. I didn’t believe it myself at first, but it did what I wanted.
balala wrote: March 19th, 2024, 8:25 pm

Code: Select all

IfMatch=^$
IfMatchAction=[!HideFade "Config-Of-Secondary-Skin"]
IfNotMatchAction=[!showFade "Config-Of-Secondary-Skin"]
Hope you know what the Config-Of-Secondary-Skin does mean. If you don't, please let us know, to explain.
I don’t know about this yet, but I’ll try to understand
Up
I couldn’t figure out how to ask this, please help. :)
Last edited by Kotofanchik on March 19th, 2024, 8:39 pm, edited 1 time in total.