Please take a look at line 451 and line 513 of MeterHistogram.cpp https://github.com/rainmeter/rainmeter/blob/master/Library/MeterHistogram.cpp
Code: Select all
double value = (m_MaxPrimaryValue == 0.0) ?
0.0
: m_PrimaryValues[(i + m_MeterPos) % meterRect.Width] / m_MaxPrimaryValue;
value -= m_MinPrimaryValue;
Given the value to be lets say 15, then:
EX:
double value = 15/20; // 0.75
value -= 10; // -9.25
Next the actual bar height in pixels is calculated:
Code: Select all
int primaryBarHeight = (int)(meterRect.Height * value);
primaryBarHeight = min(meterRect.Height, primaryBarHeight);
primaryBarHeight = max(0, primaryBarHeight);
This should be corrected by doing this:
Code: Select all
double value = (m_MaxPrimaryValue == 0.0) ?
0.0
: (m_PrimaryValues[(i + m_MeterPos) % meterRect.Width] - m_MinPrimaryValue) / (m_MaxPrimaryValue-m_MinPrimaryValue);
double value = (15-10)/(20-10); // 0.5
Thus when the actual bar height is calculated, it will return the correct result.
The Bar meter uses relative value which is why it does not have this problem.
Please include this fix in the next update.