It is currently May 18th, 2021, 10:40 pm

MeasureStyle

Report bugs with the Rainmeter application and suggest features.
Unight
Posts: 19
Joined: November 20th, 2012, 5:12 am

MeasureStyle

Post by Unight »

Sometimes we write write a lot of code below the measure node, I was thinking there might add a measurestyle option just like meterstyle ,such as:
[measurestyle1]
Substitute=”2”:”4”

[measure1]
Measure=calc
Measurestyle=measurestyle1
Formula=123

[measure2]
Measure=calc
Measurestyle=measurestyle1
Formula=231

Then our measure1 will return 143 measure2 will return 431, but we will distinction with meterstyle , we can add an option used to identify measurestyle or meterstyle under the measurestyle.forexample:

[measurestyle1]
Styletype= Measure
Substitute=”2”:”4”
User avatar
jsmorley
Developer
Posts: 21694
Joined: April 19th, 2009, 11:02 pm
Location: Fort Hunt, Virginia, USA

Re: MeasureStyle

Post by jsmorley »

Unight wrote:Sometimes we write write a lot of code below the measure node, I was thinking there might add a measurestyle option just like meterstyle ,such as:
[measurestyle1]
Substitute=”2”:”4”

[measure1]
Measure=calc
Measurestyle=measurestyle1
Formula=123

[measure2]
Measure=calc
Measurestyle=measurestyle1
Formula=231

Then our measure1 will return 143 measure2 will return 431, but we will distinction with meterstyle , we can add an option used to identify measurestyle or meterstyle under the measurestyle.forexample:

[measurestyle1]
Styletype= Measure
Substitute=”2”:”4”
While I don't think MeasureStyle does any harm, I don't see it being something with a huge amount of use. Other than perhaps some "child" WebParser measures (which would share almost no options other than the "Substitute" you mentioned), there are few times you use many measures in the same skin that share options.

In addition, I'm not sure there are not issues with Plugin measures using an "external" reference like this. It may not be as simple as meters.

Last, the idea of "StyleType=" just doesn't fit with how styles work in Rainmeter. A section being used as a MeterStyle is not some special kind of section, in fact a meter can just use another meter as a "style". There is just no need to attach any kind of identifier to a section being used as a style. Any options that are not appropriate for the calling meter are just ignored anyway.
User avatar
Cariboudjan
Posts: 144
Joined: May 12th, 2019, 8:55 am

Re: MeasureStyle

Post by Cariboudjan »

Bumping this because I think it might be useful in certain cases, and seems like pretty low hanging fruit. 🍐