Code cleanup.

This commit is contained in:
spx 2010-12-08 06:10:22 +00:00
parent 3324084c7f
commit 1d5490aa98

View File

@ -1742,8 +1742,6 @@ bool CMeterWindow::ReadSkin()
}
m_Author = m_Parser.ReadString(L"Rainmeter", L"Author", L"");
m_BackgroundName = m_Parser.ReadString(L"Rainmeter", L"Background", L"");
m_BackgroundName = MakePathAbsolute(m_BackgroundName);
static const RECT defMargins = {0};
m_BackgroundMargins = m_Parser.ReadRECT(L"Rainmeter", L"BackgroundMargins", defMargins);
@ -1758,10 +1756,18 @@ bool CMeterWindow::ReadSkin()
m_DynamicWindowSize = 0!=m_Parser.ReadInt(L"Rainmeter", L"DynamicWindowSize", 0);
if ((m_BackgroundMode == BGMODE_IMAGE || m_BackgroundMode == BGMODE_SCALED_IMAGE || m_BackgroundMode == BGMODE_TILED_IMAGE) && m_BackgroundName.empty())
if (m_BackgroundMode == BGMODE_IMAGE || m_BackgroundMode == BGMODE_SCALED_IMAGE || m_BackgroundMode == BGMODE_TILED_IMAGE)
{
m_BackgroundName = m_Parser.ReadString(L"Rainmeter", L"Background", L"");
if (!m_BackgroundName.empty())
{
m_BackgroundName = MakePathAbsolute(m_BackgroundName);
}
else
{
m_BackgroundMode = BGMODE_COPY;
}
}
m_RightMouseDownAction = m_Parser.ReadString(L"Rainmeter", L"RightMouseDownAction", L"", false);
m_LeftMouseDownAction = m_Parser.ReadString(L"Rainmeter", L"LeftMouseDownAction", L"", false);