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