mirror of
https://github.com/chibicitiberiu/rainmeter-studio.git
synced 2024-02-24 04:33:31 +00:00
parent
13d6a20805
commit
6eafb835ad
@ -1945,14 +1945,7 @@ void MeterWindow::ReadOptions()
|
|||||||
|
|
||||||
m_FadeDuration = parser.ReadInt(section, L"FadeDuration", 250);
|
m_FadeDuration = parser.ReadInt(section, L"FadeDuration", 250);
|
||||||
|
|
||||||
std::wstring skinGroup = parser.ReadString(section, L"Group", L"");
|
m_SkinGroup = parser.ReadString(section, L"Group", L"");
|
||||||
const std::wstring& group = m_Parser.ReadString(L"Rainmeter", L"Group", L"");
|
|
||||||
if (!group.empty())
|
|
||||||
{
|
|
||||||
skinGroup += L'|';
|
|
||||||
skinGroup += group;
|
|
||||||
}
|
|
||||||
InitializeGroup(skinGroup);
|
|
||||||
|
|
||||||
if (writeFlags != 0)
|
if (writeFlags != 0)
|
||||||
{
|
{
|
||||||
@ -2077,11 +2070,11 @@ bool MeterWindow::ReadSkin()
|
|||||||
std::wstring resourcePath = GetResourcesPath();
|
std::wstring resourcePath = GetResourcesPath();
|
||||||
bool hasResourcesFolder = (_waccess(resourcePath.c_str(), 0) == 0);
|
bool hasResourcesFolder = (_waccess(resourcePath.c_str(), 0) == 0);
|
||||||
|
|
||||||
m_Parser.Initialize(iniFile, this, nullptr, &resourcePath);
|
|
||||||
|
|
||||||
// Read options from Rainmeter.ini.
|
// Read options from Rainmeter.ini.
|
||||||
ReadOptions();
|
ReadOptions();
|
||||||
|
|
||||||
|
m_Parser.Initialize(iniFile, this, nullptr, &resourcePath);
|
||||||
|
|
||||||
m_Canvas = Gfx::Canvas::Create(
|
m_Canvas = Gfx::Canvas::Create(
|
||||||
m_UseD2D && GetRainmeter().GetUseD2D() ? Gfx::Renderer::PreferD2D : Gfx::Renderer::GDIP);
|
m_UseD2D && GetRainmeter().GetUseD2D() ? Gfx::Renderer::PreferD2D : Gfx::Renderer::GDIP);
|
||||||
m_Canvas->SetAccurateText(m_Parser.ReadBool(L"Rainmeter", L"AccurateText", false));
|
m_Canvas->SetAccurateText(m_Parser.ReadBool(L"Rainmeter", L"AccurateText", false));
|
||||||
@ -2111,6 +2104,15 @@ bool MeterWindow::ReadSkin()
|
|||||||
SetWindowPositionVariables(m_ScreenX, m_ScreenY);
|
SetWindowPositionVariables(m_ScreenX, m_ScreenY);
|
||||||
SetWindowSizeVariables(0, 0);
|
SetWindowSizeVariables(0, 0);
|
||||||
|
|
||||||
|
// Global settings
|
||||||
|
const std::wstring& group = m_Parser.ReadString(L"Rainmeter", L"Group", L"");
|
||||||
|
if (!group.empty())
|
||||||
|
{
|
||||||
|
m_SkinGroup += L'|';
|
||||||
|
m_SkinGroup += group;
|
||||||
|
}
|
||||||
|
InitializeGroup(m_SkinGroup);
|
||||||
|
|
||||||
static const RECT defMargins = {0};
|
static const RECT defMargins = {0};
|
||||||
m_BackgroundMargins = m_Parser.ReadRECT(L"Rainmeter", L"BackgroundMargins", defMargins);
|
m_BackgroundMargins = m_Parser.ReadRECT(L"Rainmeter", L"BackgroundMargins", defMargins);
|
||||||
m_DragMargins = m_Parser.ReadRECT(L"Rainmeter", L"DragMargins", defMargins);
|
m_DragMargins = m_Parser.ReadRECT(L"Rainmeter", L"DragMargins", defMargins);
|
||||||
|
@ -346,6 +346,7 @@ private:
|
|||||||
std::wstring m_OnUpdateAction;
|
std::wstring m_OnUpdateAction;
|
||||||
std::wstring m_OnWakeAction;
|
std::wstring m_OnWakeAction;
|
||||||
|
|
||||||
|
std::wstring m_SkinGroup;
|
||||||
std::wstring m_BackgroundName;
|
std::wstring m_BackgroundName;
|
||||||
RECT m_BackgroundMargins;
|
RECT m_BackgroundMargins;
|
||||||
RECT m_DragMargins;
|
RECT m_DragMargins;
|
||||||
|
Loading…
Reference in New Issue
Block a user