Added ImagePath to all meters with general image options. This deprecates the Path option for Image meters.

Also fixes bug in MeterHistogram that crashes Rainmeter when the PrimaryImage is invalid.
Note: For Histogram the option is called PrimaryImagePath, SecondaryImagePath, and BothImagePath
This commit is contained in:
Brian Ferguson
2013-06-07 13:35:36 -06:00
parent c6ec9093b7
commit 136689bcfb
9 changed files with 54 additions and 65 deletions

View File

@ -33,7 +33,7 @@ extern Rainmeter* g_Rainmeter;
**
*/
MeterBitmap::MeterBitmap(MeterWindow* meterWindow, const WCHAR* name) : Meter(meterWindow, name),
m_Image(L"BitmapImage", nullptr, true),
m_Image(L"BitmapImage", nullptr, true, meterWindow),
m_NeedsReload(false),
m_ZeroFrame(false),
m_FrameCount(1),
@ -167,8 +167,6 @@ void MeterBitmap::ReadOptions(ConfigParser& parser, const WCHAR* section)
m_ImageName = parser.ReadString(section, L"BitmapImage", L"");
if (!m_ImageName.empty())
{
m_MeterWindow->MakePathAbsolute(m_ImageName);
// Read tinting options
m_Image.ReadOptions(parser, section);
}