Skip to content

Commit

Permalink
Merge pull request #222 from kfh83/master
Browse files Browse the repository at this point in the history
Aero backdrop accuracy changes
  • Loading branch information
ALTaleX531 authored Mar 25, 2024
2 parents f79c362 + a1637e2 commit 28d3971
Show file tree
Hide file tree
Showing 4 changed files with 234 additions and 180 deletions.
28 changes: 28 additions & 0 deletions Common/Common.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -148,6 +148,32 @@ namespace MDWMBlurGlass
if (!ret.empty())
cfgData.blurmethod = (blurMethod)std::clamp(_wtoi(ret.data()), 0, 2);

// new - begin

ret = Utils::GetIniString(path, L"aero", L"PrimaryBalance");
if (!ret.empty())
cfgData.PrimaryBalance = (float)std::clamp(_wtof(ret.data()), 0.0, 1.0);

ret = Utils::GetIniString(path, L"aero", L"Active_SecondaryBalance");
if (!ret.empty())
cfgData.Active_SecondaryBalance = (float)std::clamp(_wtof(ret.data()), 0.0, 1.0);

ret = Utils::GetIniString(path, L"aero", L"Inactive_SecondaryBalance");
if (!ret.empty())
cfgData.Inactive_SecondaryBalance = (float)std::clamp(_wtof(ret.data()), 0.0, 1.0);


ret = Utils::GetIniString(path, L"aero", L"Active_BlurBalance");
if (!ret.empty())
cfgData.Active_BlurBalance = (float)std::clamp(_wtof(ret.data()), -1.0, 1.0);

ret = Utils::GetIniString(path, L"aero", L"Inactive_BlurBalance");
if (!ret.empty())
cfgData.Inactive_BlurBalance = (float)std::clamp(_wtof(ret.data()), -1.0, 1.0);


// new - end

ret = Utils::GetIniString(path, L"config", L"effectType");
if (!ret.empty())
{
Expand Down Expand Up @@ -178,5 +204,7 @@ namespace MDWMBlurGlass
Utils::SetIniString(path, L"config", L"inactiveBlendColorDark", std::to_wstring(cfg.inactiveBlendColorDark));
Utils::SetIniString(path, L"config", L"blurMethod", std::to_wstring((int)cfg.blurmethod));
Utils::SetIniString(path, L"config", L"effectType", std::to_wstring((int)cfg.effectType));

// not on the gui... not sure if i should put the new entries here!
}
}
10 changes: 10 additions & 0 deletions Common/Common.h
Original file line number Diff line number Diff line change
Expand Up @@ -51,6 +51,15 @@ namespace MDWMBlurGlass
float blurAmount = 20.f;
float customBlurAmount = 20.f;
float luminosityOpacity = 0.65f;

// these settings are optimal for the default Sky color from Windows 7

float PrimaryBalance = 0.08f;
float Active_SecondaryBalance = 0.43f;
float Inactive_SecondaryBalance = 0.43f;
float Active_BlurBalance = -0.125f;
float Inactive_BlurBalance = 0.365f;

COLORREF activeTextColor = 0xFF000000;
COLORREF inactiveTextColor = 0xFFB4B4B4;
COLORREF activeBlendColor = 0x64FFFFFF;
Expand All @@ -61,6 +70,7 @@ namespace MDWMBlurGlass
COLORREF activeBlendColorDark = 0x64000000;
COLORREF inactiveBlendColorDark = 0x64000000;


blurMethod blurmethod = blurMethod::CustomBlur;
effectType effectType = effectType::Blur;

Expand Down
Loading

0 comments on commit 28d3971

Please sign in to comment.