mirror of
https://github.com/chibicitiberiu/rainmeter-studio.git
synced 2024-02-24 04:33:31 +00:00
Tweaks
This commit is contained in:
parent
63a5f4be38
commit
0706bf3a6e
@ -328,9 +328,9 @@ void CMeterString::ReadOptions(CConfigParser& parser, const WCHAR* section)
|
|||||||
m_Color = parser.ReadColor(section, L"FontColor", Color::Black);
|
m_Color = parser.ReadColor(section, L"FontColor", Color::Black);
|
||||||
m_EffectColor = parser.ReadColor(section, L"FontEffectColor", Color::Black);
|
m_EffectColor = parser.ReadColor(section, L"FontEffectColor", Color::Black);
|
||||||
|
|
||||||
m_Prefix = parser.ReadString(section, L"Prefix", L"");
|
m_Text = parser.ReadString(section, L"Prefix", L"");
|
||||||
m_Postfix = parser.ReadString(section, L"Postfix", L"");
|
m_Text += parser.ReadString(section, L"Text", L"");
|
||||||
m_Text = parser.ReadString(section, L"Text", L"");
|
m_Text += parser.ReadString(section, L"Postfix", L"");
|
||||||
|
|
||||||
m_Percentual = 0!=parser.ReadInt(section, L"Percentual", 0);
|
m_Percentual = 0!=parser.ReadInt(section, L"Percentual", 0);
|
||||||
m_ClipString = 0!=parser.ReadInt(section, L"ClipString", 0);
|
m_ClipString = 0!=parser.ReadInt(section, L"ClipString", 0);
|
||||||
@ -507,26 +507,11 @@ bool CMeterString::Update()
|
|||||||
stringValues.push_back((*iter)->GetStringValue(m_AutoScale, m_Scale, decimals, m_Percentual));
|
stringValues.push_back((*iter)->GetStringValue(m_AutoScale, m_Scale, decimals, m_Percentual));
|
||||||
}
|
}
|
||||||
|
|
||||||
// Create the text
|
m_String = m_Text;
|
||||||
m_String = m_Prefix;
|
if (!stringValues.empty())
|
||||||
if (m_Text.empty())
|
|
||||||
{
|
{
|
||||||
if (!stringValues.empty())
|
ReplaceMeasures(stringValues, m_String);
|
||||||
{
|
|
||||||
m_String += stringValues[0];
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
else if (!stringValues.empty())
|
|
||||||
{
|
|
||||||
std::wstring tmpText = m_Text;
|
|
||||||
ReplaceMeasures(stringValues, tmpText);
|
|
||||||
m_String += tmpText;
|
|
||||||
}
|
|
||||||
else
|
|
||||||
{
|
|
||||||
m_String += m_Text;
|
|
||||||
}
|
|
||||||
if (!m_Postfix.empty()) m_String += m_Postfix;
|
|
||||||
|
|
||||||
switch (m_Case)
|
switch (m_Case)
|
||||||
{
|
{
|
||||||
|
@ -75,8 +75,6 @@ private:
|
|||||||
|
|
||||||
Gdiplus::Color m_Color;
|
Gdiplus::Color m_Color;
|
||||||
Gdiplus::Color m_EffectColor;
|
Gdiplus::Color m_EffectColor;
|
||||||
std::wstring m_Postfix;
|
|
||||||
std::wstring m_Prefix;
|
|
||||||
std::wstring m_Text;
|
std::wstring m_Text;
|
||||||
std::wstring m_FontFace;
|
std::wstring m_FontFace;
|
||||||
AUTOSCALE m_AutoScale;
|
AUTOSCALE m_AutoScale;
|
||||||
|
Loading…
Reference in New Issue
Block a user