mirror of
https://github.com/Flow-Launcher/Flow.Launcher.git
synced 2026-03-11 08:54:32 +00:00
Fix issues with DwmDropShadow
This commit is contained in:
parent
4a0411b7fc
commit
3a55985b20
2 changed files with 5 additions and 2 deletions
|
|
@ -3,6 +3,7 @@ using System.Drawing.Printing;
|
|||
using System.Runtime.InteropServices;
|
||||
using System.Windows;
|
||||
using System.Windows.Interop;
|
||||
using System.Windows.Media;
|
||||
|
||||
namespace Wox.Helper
|
||||
{
|
||||
|
|
@ -50,7 +51,9 @@ namespace Wox.Helper
|
|||
WindowInteropHelper helper = new WindowInteropHelper(window);
|
||||
int val = 2;
|
||||
int ret1 = DwmSetWindowAttribute(helper.Handle, 2, ref val, 4);
|
||||
|
||||
window.Background = Brushes.Transparent;
|
||||
HwndSource.FromHwnd(helper.Handle).CompositionTarget.BackgroundColor = Color.FromArgb(0, 0, 0, 0);
|
||||
|
||||
if (ret1 == 0)
|
||||
{
|
||||
Margins m = new Margins { Bottom = 0, Left = 0, Right = 0, Top = 0 };
|
||||
|
|
|
|||
|
|
@ -90,7 +90,7 @@ namespace Wox
|
|||
|
||||
InitProgressbarAnimation();
|
||||
//only works for win7+
|
||||
//DwmDropShadow.DropShadowToWindow(this);
|
||||
DwmDropShadow.DropShadowToWindow(this);
|
||||
|
||||
WindowIntelopHelper.DisableControlBox(this);
|
||||
}
|
||||
|
|
|
|||
Loading…
Reference in a new issue