mirror of
https://github.com/microsoft/PowerToys.git
synced 2026-04-06 03:07:04 +02:00
*forgot to stage files on last commit
This commit is contained in:
@@ -121,13 +121,13 @@ namespace Wox.Helper
|
||||
}
|
||||
[DllImport("user32.dll")]
|
||||
internal static extern int SetWindowCompositionAttribute(IntPtr hwnd, ref WindowCompositionAttributeData data);
|
||||
public static void EnableBlur(Window wind)
|
||||
public static void SetWindowAccent(Window wind, int themeAccentMode)
|
||||
{
|
||||
if (themeAccentMode < 0 || themeAccentMode > 3)
|
||||
themeAccentMode = 0;
|
||||
var windowHelper = new WindowInteropHelper(wind);
|
||||
|
||||
var accent = new AccentPolicy();
|
||||
accent.AccentState = AccentState.ACCENT_ENABLE_BLURBEHIND;
|
||||
accent.GradientColor = 16711680;
|
||||
accent.AccentState = (AccentState) themeAccentMode;
|
||||
var accentStructSize = Marshal.SizeOf(accent);
|
||||
|
||||
var accentPtr = Marshal.AllocHGlobal(accentStructSize);
|
||||
|
||||
@@ -460,6 +460,7 @@ namespace Wox
|
||||
Dispatcher.DelayInvoke("delayChangeTheme", () =>
|
||||
{
|
||||
ThemeManager.Theme.ChangeTheme(UserSettingStorage.Instance.Theme);
|
||||
WindowIntelopHelper.SetWindowAccent(MainWindow, UserSettingStorage.Instance.ThemeAccentMode);
|
||||
}, TimeSpan.FromMilliseconds(100));
|
||||
}
|
||||
|
||||
|
||||
@@ -27,7 +27,10 @@
|
||||
<Setter Property="Stroke" Value="Blue" />
|
||||
</Style>
|
||||
|
||||
<!-- Windows Accent Mode: 0 - none, 1 - Accent color, 2 - Accent with transparency, 3 - Blur -->
|
||||
<system:Int32 x:Key="WindowsAccentMode">0</system:Int32>
|
||||
|
||||
|
||||
<!-- Item Style -->
|
||||
<Style x:Key="BaseItemTitleStyle" TargetType="{x:Type TextBlock}">
|
||||
<Setter Property="Foreground" Value="#FFFFF8" />
|
||||
|
||||
@@ -14,6 +14,8 @@
|
||||
<Style x:Key="WindowStyle" BasedOn="{StaticResource BaseWindowStyle}" TargetType="{x:Type Window}">
|
||||
</Style>
|
||||
|
||||
|
||||
|
||||
<Style x:Key="PendingLineStyle" BasedOn="{StaticResource BasePendingLineStyle}" TargetType="{x:Type Line}">
|
||||
</Style>
|
||||
|
||||
|
||||
@@ -5,6 +5,9 @@
|
||||
<ResourceDictionary Source="Base.xaml" />
|
||||
</ResourceDictionary.MergedDictionaries>
|
||||
|
||||
<!-- Windows Accent Mode: 0 - none, 1 - Accent color, 2 - Accent with transparency, 3 - Blur -->
|
||||
<system:Int32 x:Key="WindowsAccentMode">3</system:Int32>
|
||||
|
||||
<Style x:Key="QueryBoxStyle" BasedOn="{StaticResource BaseQueryBoxStyle}" TargetType="{x:Type TextBox}">
|
||||
</Style>
|
||||
|
||||
|
||||
@@ -5,8 +5,11 @@
|
||||
<ResourceDictionary Source="Base.xaml" />
|
||||
</ResourceDictionary.MergedDictionaries>
|
||||
|
||||
<!-- Windows Accent Mode: 0 - none, 1 - Accent color, 2 - Accent with transparency, 3 - Blur -->
|
||||
<system:Int32 x:Key="WindowsAccentMode">3</system:Int32>
|
||||
|
||||
<Style x:Key="QueryBoxStyle" BasedOn="{StaticResource BaseQueryBoxStyle}" TargetType="{x:Type TextBox}">
|
||||
<Setter Property="Background" Value="#FFBBBBBB"></Setter>
|
||||
<Setter Property="Background" Value="Transparent"></Setter>
|
||||
<Setter Property="Foreground" Value="Black"></Setter>
|
||||
<Setter Property="FontFamily" Value="Helvetica"/>
|
||||
<Setter Property="FontSize" Value="32"/>
|
||||
@@ -50,7 +53,7 @@
|
||||
<Setter Property="Foreground" Value="#656565"></Setter>
|
||||
<Setter Property="FontFamily" Value="Helvetica"/>
|
||||
</Style>
|
||||
<Color x:Key="ItemSelectedBackgroundColor">#FFBBBBBB</Color>
|
||||
<Color x:Key="ItemSelectedBackgroundColor">Transparent</Color>
|
||||
|
||||
<!-- button style in the middle of the scrollbar -->
|
||||
<Style x:Key="ThumbStyle" BasedOn="{StaticResource BaseThumbStyle}" TargetType="{x:Type Thumb}">
|
||||
|
||||
@@ -258,6 +258,11 @@
|
||||
<SubType>Designer</SubType>
|
||||
<CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory>
|
||||
</None>
|
||||
<Page Include="Themes\Accent.xaml">
|
||||
<Generator>MSBuild:Compile</Generator>
|
||||
<SubType>Designer</SubType>
|
||||
<CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory>
|
||||
</Page>
|
||||
<Page Include="Themes\SimpleBlur.xaml">
|
||||
<Generator>MSBuild:Compile</Generator>
|
||||
<SubType>Designer</SubType>
|
||||
@@ -266,6 +271,7 @@
|
||||
<Page Include="Themes\Test.xaml">
|
||||
<SubType>Designer</SubType>
|
||||
<Generator>MSBuild:Compile</Generator>
|
||||
<CopyToOutputDirectory>Always</CopyToOutputDirectory>
|
||||
</Page>
|
||||
<Page Include="WoxUpdate.xaml">
|
||||
<SubType>Designer</SubType>
|
||||
|
||||
Reference in New Issue
Block a user