It is currently December 11th, 2018, 2:34 pm

Sometimes correct is not what you want

General topics related to Rainmeter.
User avatar
kyriakos876
Posts: 858
Joined: January 30th, 2017, 2:01 am
Location: Greece

Re: Sometimes correct is not what you want

kyriakos876 » October 19th, 2018, 1:33 pm

jsmorley wrote:
October 19th, 2018, 1:30 pm
Look at it this way:

If you have a meter or skin background with an opacity of 127, and you set the opacity of the skin window to 1%, then the opacity of the meter becomes 1/127 or 0.00787401574, which when applied becomes 127 * 0.00787401574, or 0.99999999898. That is just less than 1, and so becomes 0 in Rainmeter. With an opacity of 128, it becomes 127 * 0.00787401574, which is 1.00787401472. That is greater than 1, and is rounded to 1.
I understand that... that's what I wrote above anyway but you say (Correct me if I'm wrong)
that this is normal behavior... Is there a way to avoid that? If I make a skin that relies on mouse actions with some meters having the opacity lower than 128, and the end users decides they want the whole skin to be less transparent but still respond to those meters, what can I do?

This is obviously hypothetical as I don't think anything like that has ever been an issue for all the years that this option exists, but I'm just curious because if changing the transparency of a skin compromises some actions I think it's wrong... (Still mathematically correct, but practically wrong)
User avatar
jsmorley
Developer
Posts: 18451
Joined: April 19th, 2009, 11:02 pm
Location: Fort Hunt, Virginia, USA

Re: Sometimes correct is not what you want

jsmorley » October 19th, 2018, 1:38 pm

kyriakos876 wrote:
October 19th, 2018, 1:33 pm
I understand that... that's what I wrote above anyway but you say (Correct me if I'm wrong)
that this is normal behavior... Is there a way to avoid that? If I make a skin that relies on mouse actions with some meters having the opacity lower than 128, and the end users decides they want the whole skin to be less transparent but still respond to those meters, what can I do?

This is obviously hypothetical as I don't think anything like that has ever been an issue for all the years that this option exists, but I'm just curious because if changing the transparency of a skin compromises some actions I think it's wrong... (Still mathematically correct, but practically wrong)
I think you would have to have at least some part of the skin that has an opacity of at least 127 to protect a user from making it invisible to the mouse using the Transparency setting in Manage. Of course you can always hold down CTRL to interact with a fully invisible skin, but a user may or may not (likely not) know that.
User avatar
kyriakos876
Posts: 858
Joined: January 30th, 2017, 2:01 am
Location: Greece

Re: Sometimes correct is not what you want

kyriakos876 » October 19th, 2018, 1:43 pm

jsmorley wrote:
October 19th, 2018, 1:38 pm
I think you would have to have at least some part of the skin that has an opacity of at least 127 to protect a user from making it invisible to the mouse using the Transparency setting in Manage. Of course you can always hold down CTRL to interact with a fully invisible skin, but a user may or may not (likely not) know that.
Hmm so visual compromises over practical... I'll go with visual.
User avatar
jsmorley
Developer
Posts: 18451
Joined: April 19th, 2009, 11:02 pm
Location: Fort Hunt, Virginia, USA

Re: Sometimes correct is not what you want

jsmorley » October 19th, 2018, 1:46 pm

kyriakos876 wrote:
October 19th, 2018, 1:43 pm
Hmm so visual compromises over practical... I'll go with visual.
You could disable the ability for a user to change the transparency of the overall skin window...

[MeasureShowMe]
Measure=Calc
OnUpDateAction=[!SetTransparency "255"]

https://docs.rainmeter.net/manual/bangs/#SetTransparency

Their change will be effective for up to one skin update, then change back to 255.
User avatar
kyriakos876
Posts: 858
Joined: January 30th, 2017, 2:01 am
Location: Greece

Re: Sometimes correct is not what you want

kyriakos876 » October 19th, 2018, 1:50 pm

jsmorley wrote:
October 19th, 2018, 1:46 pm
You could disable the ability for a user to change the transparency of the overall skin window...

[MeasureShowMe]
Measure=Calc
OnUpDateAction=[!SetTransparency "255"]

https://docs.rainmeter.net/manual/bangs/#SetTransparency
I don't like preventing the end user from doing whatever they want... I leave that to apple, but yea, in a case where this could be an issue I would go with the [!SetTransparency "255"] option
User avatar
jsmorley
Developer
Posts: 18451
Joined: April 19th, 2009, 11:02 pm
Location: Fort Hunt, Virginia, USA

Re: Sometimes correct is not what you want

jsmorley » October 19th, 2018, 1:52 pm

Right, and by the same token it is not up to us to tell authors how to create skins. I can only tell you how things work, it's up to you how you use that.
User avatar
kyriakos876
Posts: 858
Joined: January 30th, 2017, 2:01 am
Location: Greece

Re: Sometimes correct is not what you want

kyriakos876 » October 19th, 2018, 2:18 pm

jsmorley wrote:
October 19th, 2018, 1:52 pm
Right, and by the same token it is not up to us to tell authors how to create skins. I can only tell you how things work, it's up to you how you use that.
Agree