MCPcopy Create free account
hub / github.com/TranslucentTB/TranslucentTB / SetTaskbarBlur

Method SetTaskbarBlur

ExplorerTAP/taskbarappearanceservice.cpp:78–102  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

76}
77
78HRESULT TaskbarAppearanceService::SetTaskbarBlur(HWND taskbar, UINT color, FLOAT blurAmount) try
79{
80 if (const auto info = GetTaskbarInfo(taskbar))
81 {
82 if (info->background.control && info->background.originalFill)
83 {
84 const winrt::Windows::UI::Color tint = Util::Color::FromABGR(color);
85 const wfn::float4 tintHdr = {
86 tint.R / 255.0f,
87 tint.G / 255.0f,
88 tint.B / 255.0f,
89 tint.A / 255.0f
90 };
91
92 auto compositor = wuxh::ElementCompositionPreview::GetElementVisual(info->background.control).Compositor();
93 info->background.control.Fill(winrt::make<XamlBlurBrush>(std::move(compositor), blurAmount, tintHdr));
94 }
95 }
96
97 return S_OK;
98}
99catch (...)
100{
101 return winrt::to_hresult();
102}
103
104HRESULT TaskbarAppearanceService::ReturnTaskbarToDefaultAppearance(HWND taskbar) try
105{

Callers 1

SetAttributeMethod · 0.80

Calls

no outgoing calls

Tested by

no test coverage detected