Skip to content

Commit

Permalink
.
Browse files Browse the repository at this point in the history
  • Loading branch information
Dylan Bickerstaff committed Mar 18, 2024
1 parent c108d4b commit d2c3083
Show file tree
Hide file tree
Showing 3 changed files with 35 additions and 31 deletions.
4 changes: 2 additions & 2 deletions CommonProperties.xml
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
<Project>
<PropertyGroup>
<TargetFramework>net7.0-windows</TargetFramework>
<TargetFramework>net8.0-windows</TargetFramework>
<ApplicationIcon>..\SuperLauncherAssets\logo.ico</ApplicationIcon>
<Product>Super Launcher</Product>
<AssemblyVersion>2.1.0.0</AssemblyVersion>
Expand All @@ -10,7 +10,7 @@
<RepositoryType>GIT</RepositoryType>
<PackageProjectUrl>https://github.com/belowaverage-org/SuperLauncher</PackageProjectUrl>
<PackageLicenseFile>..\LICENSE</PackageLicenseFile>
<Copyright>below average © 2023</Copyright>
<Copyright>below average © 2024</Copyright>
<Company>Dylan Bickerstaff; Adam Cunningham</Company>
<Version>2.1.0.0</Version>
<Description>🚀 Super Launcher is an admin launcher that persists in the system tray that can launch programs quickly; optionally, with administrator rights, as another user, or both.</Description>
Expand Down
12 changes: 8 additions & 4 deletions SuperLauncher/ModernLauncherShared.cs
Original file line number Diff line number Diff line change
Expand Up @@ -63,14 +63,18 @@ public static void EnableAcrylic(Window Window)
{
Window.Background = Brushes.Transparent;
IntPtr handle = new WindowInteropHelper(Window).Handle;
IntPtr dwmDmVal = Marshal.AllocHGlobal(32);
IntPtr dwmDmVal = Marshal.AllocHGlobal(4);
Marshal.WriteInt32(dwmDmVal, 1);
Win32Interop.DwmSetWindowAttribute(handle, Win32Interop.DWMWINDOWATTRIBUTE.DWMWA_USE_IMMERSIVE_DARK_MODE, dwmDmVal, 32);
Win32Interop.DwmSetWindowAttribute(handle, Win32Interop.DWMWINDOWATTRIBUTE.DWMWA_USE_IMMERSIVE_DARK_MODE, dwmDmVal, 4);
Marshal.FreeHGlobal(dwmDmVal);
IntPtr dwmBdVal = Marshal.AllocHGlobal(32);
IntPtr dwmBdVal = Marshal.AllocHGlobal(4);
Marshal.WriteInt32(dwmBdVal, 3);
Win32Interop.DwmSetWindowAttribute(handle, Win32Interop.DWMWINDOWATTRIBUTE.DWMWA_SYSTEMBACKDROP_TYPE, dwmBdVal, 32);
Win32Interop.DwmSetWindowAttribute(handle, Win32Interop.DWMWINDOWATTRIBUTE.DWMWA_SYSTEMBACKDROP_TYPE, dwmBdVal, 4);
Marshal.FreeHGlobal(dwmBdVal);
IntPtr dwmTbVal = Marshal.AllocHGlobal(4);
Marshal.WriteInt32(dwmTbVal, unchecked((int)0xFFFFFFFE));
Win32Interop.DwmSetWindowAttribute(handle, Win32Interop.DWMWINDOWATTRIBUTE.DWMWA_CAPTION_COLOR, dwmTbVal, 4);
Marshal.FreeHGlobal(dwmTbVal);
}
}
}
50 changes: 25 additions & 25 deletions SuperLauncher/Win32Interop.cs
Original file line number Diff line number Diff line change
Expand Up @@ -116,32 +116,32 @@ public struct WindowCompositionAttributeData
}
public enum DWMWINDOWATTRIBUTE
{
DWMWA_NCRENDERING_ENABLED,
DWMWA_NCRENDERING_POLICY,
DWMWA_TRANSITIONS_FORCEDISABLED,
DWMWA_ALLOW_NCPAINT,
DWMWA_CAPTION_BUTTON_BOUNDS,
DWMWA_NONCLIENT_RTL_LAYOUT,
DWMWA_FORCE_ICONIC_REPRESENTATION,
DWMWA_FLIP3D_POLICY,
DWMWA_EXTENDED_FRAME_BOUNDS,
DWMWA_HAS_ICONIC_BITMAP,
DWMWA_DISALLOW_PEEK,
DWMWA_EXCLUDED_FROM_PEEK,
DWMWA_CLOAK,
DWMWA_CLOAKED,
DWMWA_FREEZE_REPRESENTATION,
DWMWA_PASSIVE_UPDATE_MODE,
DWMWA_USE_HOSTBACKDROPBRUSH,
DWMWA_USE_IMMERSIVE_DARK_MODE = 20,
DWMWA_WINDOW_CORNER_PREFERENCE = 33,
DWMWA_BORDER_COLOR,
DWMWA_CAPTION_COLOR,
DWMWA_TEXT_COLOR,
DWMWA_VISIBLE_FRAME_BORDER_THICKNESS,
DWMWA_SYSTEMBACKDROP_TYPE,
DWMWA_NCRENDERING_ENABLED = 1, // [get] Is non-client rendering enabled/disabled
DWMWA_NCRENDERING_POLICY, // [set] DWMNCRENDERINGPOLICY - Non-client rendering policy
DWMWA_TRANSITIONS_FORCEDISABLED, // [set] Potentially enable/forcibly disable transitions
DWMWA_ALLOW_NCPAINT, // [set] Allow contents rendered in the non-client area to be visible on the DWM-drawn frame.
DWMWA_CAPTION_BUTTON_BOUNDS, // [get] Bounds of the caption button area in window-relative space.
DWMWA_NONCLIENT_RTL_LAYOUT, // [set] Is non-client content RTL mirrored
DWMWA_FORCE_ICONIC_REPRESENTATION, // [set] Force this window to display iconic thumbnails.
DWMWA_FLIP3D_POLICY, // [set] Designates how Flip3D will treat the window.
DWMWA_EXTENDED_FRAME_BOUNDS, // [get] Gets the extended frame bounds rectangle in screen space
DWMWA_HAS_ICONIC_BITMAP, // [set] Indicates an available bitmap when there is no better thumbnail representation.
DWMWA_DISALLOW_PEEK, // [set] Don't invoke Peek on the window.
DWMWA_EXCLUDED_FROM_PEEK, // [set] LivePreview exclusion information
DWMWA_CLOAK, // [set] Cloak or uncloak the window
DWMWA_CLOAKED, // [get] Gets the cloaked state of the window
DWMWA_FREEZE_REPRESENTATION, // [set] BOOL, Force this window to freeze the thumbnail without live update
DWMWA_PASSIVE_UPDATE_MODE, // [set] BOOL, Updates the window only when desktop composition runs for other reasons
DWMWA_USE_HOSTBACKDROPBRUSH, // [set] BOOL, Allows the use of host backdrop brushes for the window.
DWMWA_USE_IMMERSIVE_DARK_MODE = 20, // [set] BOOL, Allows a window to either use the accent color, or dark, according to the user Color Mode preferences.
DWMWA_WINDOW_CORNER_PREFERENCE = 33, // [set] WINDOW_CORNER_PREFERENCE, Controls the policy that rounds top-level window corners
DWMWA_BORDER_COLOR, // [set] COLORREF, The color of the thin border around a top-level window
DWMWA_CAPTION_COLOR, // [set] COLORREF, The color of the caption
DWMWA_TEXT_COLOR, // [set] COLORREF, The color of the caption text
DWMWA_VISIBLE_FRAME_BORDER_THICKNESS, // [get] UINT, width of the visible border around a thick frame window
DWMWA_SYSTEMBACKDROP_TYPE, // [get, set] SYSTEMBACKDROP_TYPE, Controls the system-drawn backdrop material of a window, including behind the non-client area.
DWMWA_LAST
}
};
public enum WindowCompositionAttribute
{
// ...
Expand Down

0 comments on commit d2c3083

Please sign in to comment.