Skip to content

Commit

Permalink
update 3.0.0
Browse files Browse the repository at this point in the history
  • Loading branch information
Maplespe committed Nov 27, 2024

Verified

This commit was created on GitHub.com and signed with GitHub’s verified signature. The key has expired.
1 parent 26f83bc commit 9cdc0fb
Showing 66 changed files with 4,917 additions and 4,651 deletions.
14 changes: 6 additions & 8 deletions Common/Common.cpp
Original file line number Diff line number Diff line change
@@ -107,7 +107,9 @@ namespace MDWMBlurGlass
cfgData.useAccentColor = GetConfigBool(L"useAccentColor");
cfgData.crossFade = GetConfigBool(L"crossFade", true);
cfgData.overrideAccent = GetConfigBool(L"overrideAccent");
cfgData.occlusionCulling = GetConfigBool(L"occlusionCulling");
cfgData.scaleOptimizer = GetConfigBool(L"scaleOptimizer");
cfgData.disableOnBattery = GetConfigBool(L"disableOnBattery", true);
cfgData.titlebtnGlow = GetConfigBool(L"titlebtnGlow");

GetCfgValueInternal(L"extendRound",
{
@@ -217,11 +219,6 @@ namespace MDWMBlurGlass
cfgData.titlebtnOffsetX = (UINT)std::clamp(_wtoi(value.data()), -1, 1000);
});

GetCfgValueInternal(L"cullingLevel",
{
cfgData.cullingLevel = (UINT)std::clamp(_wtoi(value.data()), 0, 1);
});

return cfgData;
}

@@ -268,8 +265,9 @@ namespace MDWMBlurGlass
{ L"effectType", make_wstring((int)cfg.effectType) },
{ L"crossfadeTime", make_wstring(cfg.crossfadeTime) },
{ L"overrideAccent", make_wstring(cfg.overrideAccent) },
{ L"occlusionCulling", make_wstring(cfg.occlusionCulling) }
/*{ L"cullingLevel", make_wstring(cfg.cullingLevel) }*/
{ L"occlusionCulling", make_wstring(cfg.scaleOptimizer) },
{ L"disableOnBattery", make_wstring(cfg.disableOnBattery) },
{ L"titlebtnGlow", make_wstring(cfg.titlebtnGlow) }
}); const auto & [key, value] : regkeyList)
{
Utils::SetIniString(path, L"config", key, value);
4 changes: 0 additions & 4 deletions Common/Common.h
Original file line number Diff line number Diff line change
@@ -56,14 +56,10 @@ namespace MDWMBlurGlass

bool scaleOptimizer = false;
bool titlebtnGlow = false;
bool turnofflightGlass = false;

bool occlusionCulling = false;

//Options without GUI
int extendRound = 10;
int titlebtnOffsetX = -1;
int cullingLevel = 0;
//

float blurAmount = 20.f;
1 change: 1 addition & 0 deletions Common/winrt.h
Original file line number Diff line number Diff line change
@@ -22,6 +22,7 @@
#include <windows.graphics.h>
#include <windows.graphics.directx.h>
#include <windows.graphics.effects.h>
#include <windows.graphics.interop.h>

#include <Windows.Foundation.h>
#include <Windows.Foundation.Collections.h>
10 changes: 4 additions & 6 deletions DWMBlurGlass/DWMBlurGlass.vcxproj
Original file line number Diff line number Diff line change
@@ -120,14 +120,14 @@
<SDLCheck>true</SDLCheck>
<PreprocessorDefinitions>_DEBUG;_CONSOLE;%(PreprocessorDefinitions)</PreprocessorDefinitions>
<ConformanceMode>true</ConformanceMode>
<AdditionalIncludeDirectories>$(MUI_LIBRARY)\src\include;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
<AdditionalIncludeDirectories>$(MUI_LITE_LIBRARY)\src\include;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
<LanguageStandard>stdcpp20</LanguageStandard>
<RuntimeLibrary>MultiThreadedDebug</RuntimeLibrary>
</ClCompile>
<Link>
<SubSystem>Windows</SubSystem>
<GenerateDebugInformation>true</GenerateDebugInformation>
<AdditionalLibraryDirectories>$(MUI_LIBRARY)\library\;%(AdditionalLibraryDirectories)</AdditionalLibraryDirectories>
<AdditionalLibraryDirectories>$(MUI_LITE_LIBRARY)\library\;%(AdditionalLibraryDirectories)</AdditionalLibraryDirectories>
</Link>
</ItemDefinitionGroup>
<ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Release|x64'">
@@ -138,7 +138,7 @@
<SDLCheck>true</SDLCheck>
<PreprocessorDefinitions>NDEBUG;_CONSOLE;%(PreprocessorDefinitions)</PreprocessorDefinitions>
<ConformanceMode>true</ConformanceMode>
<AdditionalIncludeDirectories>$(MUI_LIBRARY)\src\include;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
<AdditionalIncludeDirectories>$(MUI_LITE_LIBRARY)\src\include;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
<LanguageStandard>stdcpp20</LanguageStandard>
<RuntimeLibrary>MultiThreaded</RuntimeLibrary>
</ClCompile>
@@ -147,7 +147,7 @@
<EnableCOMDATFolding>true</EnableCOMDATFolding>
<OptimizeReferences>true</OptimizeReferences>
<GenerateDebugInformation>true</GenerateDebugInformation>
<AdditionalLibraryDirectories>$(MUI_LIBRARY)\library\;%(AdditionalLibraryDirectories)</AdditionalLibraryDirectories>
<AdditionalLibraryDirectories>$(MUI_LITE_LIBRARY)\library\;%(AdditionalLibraryDirectories)</AdditionalLibraryDirectories>
<UACExecutionLevel>RequireAdministrator</UACExecutionLevel>
</Link>
</ItemDefinitionGroup>
@@ -162,7 +162,6 @@
<ClInclude Include="Helper\Helper.h" />
<ClInclude Include="Helper\SymbolResolver.h" />
<ClInclude Include="Helper\wil.h" />
<ClInclude Include="MDcompRender.h" />
<ClInclude Include="MainWindow.h" />
<ClInclude Include="MHostHelper.h" />
<ClInclude Include="Page\MainPage.h" />
@@ -177,7 +176,6 @@
<ClCompile Include="Extend\Dialog.cpp" />
<ClCompile Include="Helper\Helper.cpp" />
<ClCompile Include="Helper\SymbolResolver.cpp" />
<ClCompile Include="MDcompRender.cpp" />
<ClCompile Include="MainWindow.cpp" />
<ClCompile Include="MHostHelper.cpp" />
<ClCompile Include="Page\MainPage.cpp" />
6 changes: 0 additions & 6 deletions DWMBlurGlass/DWMBlurGlass.vcxproj.filters
Original file line number Diff line number Diff line change
@@ -51,9 +51,6 @@
<ClInclude Include="MainWindow.h">
<Filter>头文件</Filter>
</ClInclude>
<ClInclude Include="MDcompRender.h">
<Filter>头文件</Filter>
</ClInclude>
<ClInclude Include="resource.h">
<Filter>资源文件</Filter>
</ClInclude>
@@ -95,9 +92,6 @@
<ClCompile Include="MainWindow.cpp">
<Filter>源文件</Filter>
</ClCompile>
<ClCompile Include="MDcompRender.cpp">
<Filter>源文件</Filter>
</ClCompile>
<ClCompile Include="Extend\Dialog.cpp">
<Filter>Extend</Filter>
</ClCompile>
8 changes: 4 additions & 4 deletions DWMBlurGlass/Extend/ColorDisplay.cpp
Original file line number Diff line number Diff line change
@@ -29,7 +29,7 @@ namespace Mui
{
return new ColorDisplay(parent);
};
M_REGISTER_CTRL(method);
MCTRL_REGISTER(method);
}

ColorDisplay::ColorDisplay(UIControl* parent)
@@ -51,7 +51,7 @@ namespace Mui
else if (attribName == L"fontStyle")
{
fontStyle = *(UILabel::Attribute*)M_StoULong64(attrib);
font = m_render->CreateFonts(L"", fontStyle.font, fontStyle.fontSize, fontStyle.fontCustom);
font = m_render->CreateFonts(L"", fontStyle.font.view(), fontStyle.fontSize, fontStyle.fontCustom);
}
else if (attribName == L"text")
fontStyle.text = attrib;
@@ -136,7 +136,7 @@ namespace Mui

if (auto title = font->GetText(); !title.empty())
{
font->SetText(fontStyle.text);
font->SetText(fontStyle.text.view());
brush->SetColor(fontStyle.fontColor);

font->SetFontSize(_scale_to(14, scale.cx), std::make_pair(0u, (_m_uint)font->GetText().length()));
@@ -151,7 +151,7 @@ namespace Mui
auto scale = GetRectScale().scale();
const float fontSize = M_MIN(scale.cx, scale.cy) * (float)fontStyle.fontSize;

font = render->CreateFonts(L"", fontStyle.font, (_m_uint)fontSize, fontStyle.fontCustom);
font = render->CreateFonts(L"", fontStyle.font.view(), (_m_uint)fontSize, fontStyle.fontCustom);
brush = render->CreateBrush(fontStyle.fontColor);
pen = render->CreatePen(1, normalColor);
}
8 changes: 4 additions & 4 deletions DWMBlurGlass/Extend/ColorDisplay.h
Original file line number Diff line number Diff line change
@@ -25,11 +25,11 @@ namespace Mui
class ColorDisplay : public UIControl
{
public:
M_DEF_CTRL(L"ColorDisplay")
{
MCTRL_DEFINE
(
L"ColorDisplay",
{ CtrlMgr::AttribType::labelStyle, L"fontStyle" }
}
M_DEF_CTRL_END
);

ColorDisplay(UIControl* parent);

Loading

0 comments on commit 9cdc0fb

Please sign in to comment.