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