*forgot to stage files on last commit

This commit is contained in:
Boris Makogonyuk
2015-11-10 06:36:08 +01:00
parent 724cb0787d
commit 287e15fddc
9 changed files with 33 additions and 10 deletions

View File

@@ -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);

View File

@@ -460,6 +460,7 @@ namespace Wox
Dispatcher.DelayInvoke("delayChangeTheme", () =>
{
ThemeManager.Theme.ChangeTheme(UserSettingStorage.Instance.Theme);
WindowIntelopHelper.SetWindowAccent(MainWindow, UserSettingStorage.Instance.ThemeAccentMode);
}, TimeSpan.FromMilliseconds(100));
}

View File

@@ -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" />

View File

@@ -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>

View File

@@ -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>

View File

@@ -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}">

View File

@@ -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>