The sample skin displays up to 64 rows of numbers, and has 64 dummy measures to go along with them. These meters and measures are separated out into several @include files, and the skin has logic to select the appropriate files depending on what the variable is set to:
Each file only includes the meters/measures that are unique to it, then also has an @include for the previous file. This way, when the logic selects , it will also have the code from the previous two files:
All of this is done in order to make the skin leaner for those who don't need 64 rows of measures and meters. In CPU Meter, this can drastically increase performance, decreasing the file size from 5,334 lines to 1,658 lines for those who have 8 threads or less.
Code: Select all
[IncludeSection] @includeMeasures16=Include16.inc [MeasureText17] Measure=Calc Formula=17 [MeasureText18] Measure=Calc Formula=18 [MeasureText19] Measure=Calc Formula=19 [MeasureText20] Measure=Calc Formula=20 [MeasureText21] Measure=Calc Formula=21 [MeasureText22] Measure=Calc Formula=22 [MeasureText23] Measure=Calc Formula=23 [MeasureText24] Measure=Calc Formula=24
Now, on to the actual issue!
Normally, the skin looks like this, if you have set to 6:
But if you increase to anything greater than 8 (in this case, 20), this happens:
For some strange reason, all of the meters from any previous files start at Y=0, and are placed behind all of the other meters in the skin!
I spent a good while debugging this, trying to figure out what was going on. Then, I discovered that if I comment out the measures @include in the base skin's code, it fixes itself!
After more testing, this is what I discovered:
- If you comment out the measures @include in the base skin, the problem disappears
- If you set the measures @include to always include , then the problem never occurs
- Changing the number of measures in each @include doesn't help
- If I go ahead and copy the code from each previous @include into the one that is being used, the problem disappears
I suspect that this is a bug with @includes, because honestly, I can't come up with any other explanation...
The .RMSKIN contains the example skin and all of its include files. I also added an extremely watered-down version of my CPU Meter to aid with testing.
I'd appreciate any help!
Here's the code for the base sample skin, for those who are away from their PCs:
Rainmeter 184.108.40.20677 beta (64-bit)
Code: Select all
[Rainmeter] MiddleMouseUpAction=[!Refresh] AccurateText=1 [StyleString] FontFace=Calibri FontSize=9 FontColor=230,230,230 X=5 Y=#rowSpacing#R Antialias=1 [StyleStringCenterAlign] X=(#bgWidth# / 2) Y=r StringAlign=Center [StyleStringRightAlign] X=(#bgWidth# - 5) Y=r StringAlign=Right [Variables] num=32 ; DO NOT CHANGE rowSpacing=0 bgWidth=100 includeNum=32 ; ----- Measures ----- [MeasureSetFile] Measure=Calc Formula=(#num# > 8) ? ((#num# > 16) ? ((#num# > 24) ? ((#num# > 32) ? ((#num# > 48) ? 64 : 48) : 32) : 24) : 16) : 8 IfCondition=MeasureSetFile <> #includeNum# IfTrueAction=[!WriteKeyValue Variables includeNum "[MeasureSetFile]"][!Refresh] DynamicVariables=1 ; If you comment out this @include, the problem disappears... @includeMeasures=Includes\Measures\Include#includeNum#.inc ; ----- Meters ----- [MeterBackground] Meter=Image SolidColor=15,15,15 W=#bgWidth# H=[MeterBackgroundHeight:Y] DynamicVariables=1 [MeterBeforeTest] Meter=String MeterStyle=StyleString Y=3 Text=Before @includeMeters=Includes\Meters\Include#includeNum#.inc [MeterAfterTest] Meter=String MeterStyle=StyleString Text=After [MeterBackgroundHeight] Meter=Image SolidColor=255,255,255,0 Y=2R W=100 H=1
Language: English (1033)
Build time: 2019-01-19 7:23:01
Commit Hash: c224b70b
Windows 10 Pro 1803 64-bit (build 17134) - English (1033)
Path: C:\Program Files\Rainmeter\