mirror of
https://github.com/chibicitiberiu/rainmeter-studio.git
synced 2024-02-24 04:33:31 +00:00
Cosmetics
This commit is contained in:
parent
e62a1aa262
commit
e53b984bde
@ -308,24 +308,28 @@ void Meter::ReadOptions(ConfigParser& parser, const WCHAR* section)
|
||||
static const Gdiplus::Rect defPadding;
|
||||
m_Padding = parser.ReadRect(section, L"Padding", defPadding);
|
||||
|
||||
int oldW = m_W;
|
||||
bool oldWDefined = m_WDefined;
|
||||
int w = parser.ReadInt(section, L"W", m_W);
|
||||
m_WDefined = parser.GetLastValueDefined();
|
||||
if (IsFixedSize(true)) m_W = w;
|
||||
const int oldW = m_W;
|
||||
const bool oldWDefined = m_WDefined;
|
||||
const int widthPadding = GetWidthPadding();
|
||||
|
||||
const int w = parser.ReadInt(section, L"W", m_W);
|
||||
m_WDefined = parser.GetLastValueDefined();
|
||||
|
||||
if (IsFixedSize(true)) m_W = w;
|
||||
if (oldW != (m_W - widthPadding)) m_W += widthPadding;
|
||||
if (!m_WDefined && oldWDefined && IsFixedSize())
|
||||
{
|
||||
m_W = 0;
|
||||
}
|
||||
|
||||
int oldH = m_H;
|
||||
bool oldHDefined = m_HDefined;
|
||||
int h = parser.ReadInt(section, L"H", m_H);
|
||||
m_HDefined = parser.GetLastValueDefined();
|
||||
if (IsFixedSize(true)) m_H = h;
|
||||
const int oldH = m_H;
|
||||
const bool oldHDefined = m_HDefined;
|
||||
const int heightPadding = GetHeightPadding();
|
||||
|
||||
const int h = parser.ReadInt(section, L"H", m_H);
|
||||
m_HDefined = parser.GetLastValueDefined();
|
||||
|
||||
if (IsFixedSize(true)) m_H = h;
|
||||
if (oldH != (m_H - heightPadding)) m_H += heightPadding;
|
||||
if (!m_HDefined && oldHDefined && IsFixedSize())
|
||||
{
|
||||
|
Loading…
Reference in New Issue
Block a user