Added "AccurateText" option [Rainmeter] section of a skin.

When AccurateText=0 (default) and UseD2D=0, inaccurate GDI+ measuring of text is used
When AccurateText=1 and UseD2D=0, Accurate measuring occurs similar to D2D
When AccurateText=0 and UseD2D=1, D2D adds padding to the text similar to GDI+
When AccurateText=1 and UseD2D=1, Accurate measuring occurs using D2D
This commit is contained in:
Brian Ferguson
2013-07-25 14:53:02 -06:00
parent 3bf2bd3902
commit b27bf1ee63
6 changed files with 77 additions and 9 deletions

View File

@ -2077,6 +2077,9 @@ bool MeterWindow::ReadSkin()
// Read options from Rainmeter.ini.
ReadOptions();
m_AccurateText = 0!=m_Parser.ReadInt(L"Rainmeter", L"AccurateText", 0);
m_Canvas->SetAccurateText(m_AccurateText);
// Check the version
UINT appVersion = m_Parser.ReadUInt(L"Rainmeter", L"AppVersion", 0);
if (appVersion > RAINMETER_VERSION)

View File

@ -324,6 +324,7 @@ private:
void CreateDoubleBuffer(int cx, int cy);
Gfx::Canvas* m_Canvas;
bool m_AccurateText;
ConfigParser m_Parser;