mirror of
https://github.com/microsoft/PowerToys.git
synced 2026-04-08 12:18:50 +02:00
UI changes.
This commit is contained in:
39
Wox/App.xaml
39
Wox/App.xaml
@@ -7,6 +7,45 @@
|
|||||||
<ResourceDictionary.MergedDictionaries>
|
<ResourceDictionary.MergedDictionaries>
|
||||||
<ResourceDictionary Source="Themes/Default.xaml"></ResourceDictionary>
|
<ResourceDictionary Source="Themes/Default.xaml"></ResourceDictionary>
|
||||||
</ResourceDictionary.MergedDictionaries>
|
</ResourceDictionary.MergedDictionaries>
|
||||||
|
|
||||||
|
<Style x:Key="BaseWindowStyle" TargetType="{x:Type Window}">
|
||||||
|
<Setter Property="Height" Value="80" />
|
||||||
|
<Setter Property="Width" Value="500" />
|
||||||
|
<Setter Property="Background" Value="#424242" />
|
||||||
|
</Style>
|
||||||
|
|
||||||
|
<Style x:Key="BaseQueryBoxStyle" TargetType="{x:Type TextBox}">
|
||||||
|
<Setter Property="BorderThickness" Value="0" />
|
||||||
|
<Setter Property="FontSize" Value="25" />
|
||||||
|
<Setter Property="FontWeight" Value="Medium" />
|
||||||
|
<Setter Property="AllowDrop" Value="true" />
|
||||||
|
<Setter Property="Height" Value="46" />
|
||||||
|
<Setter Property="Background" Value="#616161" />
|
||||||
|
<Setter Property="Foreground" Value="#E3E0E3" />
|
||||||
|
<Setter Property="VerticalContentAlignment" Value="Center" />
|
||||||
|
<Setter Property="Stylus.IsFlicksEnabled" Value="False" />
|
||||||
|
</Style>
|
||||||
|
|
||||||
|
<!-- search item title -->
|
||||||
|
<Style x:Key="BaseItemTitleStyle" TargetType="{x:Type TextBlock}">
|
||||||
|
<Setter Property="Foreground" Value="#FFFFF8" />
|
||||||
|
<Setter Property="FontSize" Value="16" />
|
||||||
|
<Setter Property="FontWeight" Value="Medium" />
|
||||||
|
</Style>
|
||||||
|
<!-- search item selected title -->
|
||||||
|
<Style x:Key="BaseItemTitleSelectedStyle" TargetType="{x:Type TextBlock}">
|
||||||
|
<Setter Property="Foreground" Value="#FFFFF8" />
|
||||||
|
<Setter Property="FontSize" Value="16" />
|
||||||
|
<Setter Property="FontWeight" Value="Medium" />
|
||||||
|
</Style>
|
||||||
|
|
||||||
|
<!-- search item sub title -->
|
||||||
|
<Style x:Key="BaseItemSubTitleStyle" TargetType="{x:Type TextBlock}">
|
||||||
|
<Setter Property="Foreground" Value="#D9D9D4" />
|
||||||
|
</Style>
|
||||||
|
<Style x:Key="BaseItemSubTitleSelectedStyle" TargetType="{x:Type TextBlock}">
|
||||||
|
<Setter Property="Foreground" Value="#D9D9D4" />
|
||||||
|
</Style>
|
||||||
</ResourceDictionary>
|
</ResourceDictionary>
|
||||||
</Application.Resources>
|
</Application.Resources>
|
||||||
</Application>
|
</Application>
|
||||||
|
|||||||
@@ -41,7 +41,7 @@ namespace Wox
|
|||||||
|
|
||||||
InitialTray();
|
InitialTray();
|
||||||
hook.KeyPressed += OnHotKey;
|
hook.KeyPressed += OnHotKey;
|
||||||
hook.RegisterHotKey(XModifierKeys.Alt, Keys.Space);
|
hook.RegisterHotKey(XModifierKeys.Win, Keys.W);
|
||||||
ThreadPool.SetMaxThreads(30, 10);
|
ThreadPool.SetMaxThreads(30, 10);
|
||||||
InitProgressbarAnimation();
|
InitProgressbarAnimation();
|
||||||
try
|
try
|
||||||
@@ -53,7 +53,6 @@ namespace Wox
|
|||||||
SetTheme(CommonStorage.Instance.UserSetting.Theme = "Default");
|
SetTheme(CommonStorage.Instance.UserSetting.Theme = "Default");
|
||||||
}
|
}
|
||||||
|
|
||||||
Plugins.Init();
|
|
||||||
}
|
}
|
||||||
|
|
||||||
private void WakeupApp()
|
private void WakeupApp()
|
||||||
@@ -201,6 +200,7 @@ namespace Wox
|
|||||||
Top = (SystemParameters.PrimaryScreenHeight - ActualHeight) / 3;
|
Top = (SystemParameters.PrimaryScreenHeight - ActualHeight) / 3;
|
||||||
|
|
||||||
//WakeupApp();
|
//WakeupApp();
|
||||||
|
Plugins.Init();
|
||||||
|
|
||||||
keyboardListener.hookedKeyboardCallback += KListener_hookedKeyboardCallback;
|
keyboardListener.hookedKeyboardCallback += KListener_hookedKeyboardCallback;
|
||||||
}
|
}
|
||||||
@@ -302,7 +302,7 @@ namespace Wox
|
|||||||
|
|
||||||
resultCtrl.AddResults(l);
|
resultCtrl.AddResults(l);
|
||||||
|
|
||||||
Debug.WriteLine("Time:" + (Environment.TickCount - t1) + " Count:" + l.Count);
|
Debug.WriteLine("Total Time:" + (Environment.TickCount - t1) + " Count:" + l.Count);
|
||||||
})), TimeSpan.FromMilliseconds(50));
|
})), TimeSpan.FromMilliseconds(50));
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -44,6 +44,12 @@
|
|||||||
<TextBlock Style="{DynamicResource ItemSubTitleStyle}" Visibility="{Binding SubTitle, Converter={wox:StringNullOrEmptyToVisibilityConverter}}" Grid.Row="1" x:Name="tbSubTitle" Text="{Binding SubTitle}"></TextBlock>
|
<TextBlock Style="{DynamicResource ItemSubTitleStyle}" Visibility="{Binding SubTitle, Converter={wox:StringNullOrEmptyToVisibilityConverter}}" Grid.Row="1" x:Name="tbSubTitle" Text="{Binding SubTitle}"></TextBlock>
|
||||||
</Grid>
|
</Grid>
|
||||||
</Grid>
|
</Grid>
|
||||||
|
<DataTemplate.Triggers>
|
||||||
|
<DataTrigger Binding="{Binding RelativeSource={RelativeSource Mode=FindAncestor, AncestorType={x:Type ListBoxItem}}, Path=IsSelected}" Value="True">
|
||||||
|
<Setter TargetName="tbTitle" Property="Style" Value="{DynamicResource ItemTitleSelectedStyle}"/>
|
||||||
|
<Setter TargetName="tbSubTitle" Property="Style" Value="{DynamicResource ItemSubTitleSelectedStyle}"/>
|
||||||
|
</DataTrigger>
|
||||||
|
</DataTemplate.Triggers>
|
||||||
</DataTemplate>
|
</DataTemplate>
|
||||||
</ListBox.ItemTemplate>
|
</ListBox.ItemTemplate>
|
||||||
</ListBox>
|
</ListBox>
|
||||||
|
|||||||
@@ -1,4 +1,6 @@
|
|||||||
using System.Collections.Generic;
|
using System;
|
||||||
|
using System.Collections.Generic;
|
||||||
|
using System.Diagnostics;
|
||||||
using System.Windows;
|
using System.Windows;
|
||||||
using System.Windows.Controls;
|
using System.Windows.Controls;
|
||||||
using Wox.Helper;
|
using Wox.Helper;
|
||||||
@@ -23,7 +25,6 @@ namespace Wox
|
|||||||
lbResults.Items.Insert(position, result);
|
lbResults.Items.Insert(position, result);
|
||||||
}
|
}
|
||||||
gridContainer.Margin = lbResults.Items.Count > 0 ? new Thickness { Top = 8 } : new Thickness { Top = 0 };
|
gridContainer.Margin = lbResults.Items.Count > 0 ? new Thickness { Top = 8 } : new Thickness { Top = 0 };
|
||||||
lbResults.UpdateLayout();
|
|
||||||
SelectFirst();
|
SelectFirst();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@@ -1,16 +1,7 @@
|
|||||||
<ResourceDictionary xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
|
<ResourceDictionary xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
|
||||||
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
|
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
|
||||||
xmlns:system="clr-namespace:System;assembly=mscorlib">
|
xmlns:system="clr-namespace:System;assembly=mscorlib">
|
||||||
<Style x:Key="QueryBoxStyle" TargetType="{x:Type TextBox}">
|
<Style x:Key="QueryBoxStyle" TargetType="{x:Type TextBox}" BasedOn="{StaticResource BaseQueryBoxStyle}">
|
||||||
<Setter Property="BorderThickness" Value="0" />
|
|
||||||
<Setter Property="FontSize" Value="25" />
|
|
||||||
<Setter Property="FontWeight" Value="Medium" />
|
|
||||||
<Setter Property="AllowDrop" Value="true" />
|
|
||||||
<Setter Property="Height" Value="46" />
|
|
||||||
<Setter Property="Background" Value="#616161" />
|
|
||||||
<Setter Property="Foreground" Value="#E3E0E3" />
|
|
||||||
<Setter Property="VerticalContentAlignment" Value="Center" />
|
|
||||||
<Setter Property="Stylus.IsFlicksEnabled" Value="False" />
|
|
||||||
</Style>
|
</Style>
|
||||||
<Style x:Key="WindowStyle" TargetType="{x:Type Window}">
|
<Style x:Key="WindowStyle" TargetType="{x:Type Window}">
|
||||||
<Setter Property="Height" Value="80" />
|
<Setter Property="Height" Value="80" />
|
||||||
@@ -25,15 +16,16 @@
|
|||||||
</Style>
|
</Style>
|
||||||
|
|
||||||
<!-- Item Style -->
|
<!-- Item Style -->
|
||||||
<Style x:Key="ItemTitleStyle" TargetType="{x:Type TextBlock}">
|
<Style x:Key="ItemTitleStyle" TargetType="{x:Type TextBlock}" BasedOn="{StaticResource BaseItemTitleStyle}">
|
||||||
<Setter Property="Foreground" Value="#FFFFF8" />
|
<Setter Property="Foreground" Value="#FFFFF8" />
|
||||||
<Setter Property="FontSize" Value="16" />
|
|
||||||
<Setter Property="FontWeight" Value="Medium" />
|
|
||||||
</Style>
|
</Style>
|
||||||
<Style x:Key="ItemSubTitleStyle" TargetType="{x:Type TextBlock}">
|
<Style x:Key="ItemSubTitleStyle" TargetType="{x:Type TextBlock}" BasedOn="{StaticResource BaseItemSubTitleStyle}">
|
||||||
<Setter Property="Foreground" Value="#D9D9D4" />
|
<Setter Property="Foreground" Value="#D9D9D4" />
|
||||||
</Style>
|
</Style>
|
||||||
|
<Style x:Key="ItemTitleSelectedStyle" TargetType="{x:Type TextBlock}" BasedOn="{StaticResource BaseItemTitleSelectedStyle}">
|
||||||
|
</Style>
|
||||||
|
<Style x:Key="ItemSubTitleSelectedStyle" TargetType="{x:Type TextBlock}" BasedOn="{StaticResource BaseItemSubTitleSelectedStyle}">
|
||||||
|
</Style>
|
||||||
<Color x:Key="ResultItemHighlightBackgroundColor">#4F6180</Color>
|
<Color x:Key="ResultItemHighlightBackgroundColor">#4F6180</Color>
|
||||||
|
|
||||||
<Style x:Key="listboxStyle" TargetType="{x:Type ListBox}">
|
<Style x:Key="listboxStyle" TargetType="{x:Type ListBox}">
|
||||||
|
|||||||
@@ -23,7 +23,6 @@
|
|||||||
<Setter Property="Stroke" Value="Blue"></Setter>
|
<Setter Property="Stroke" Value="Blue"></Setter>
|
||||||
</Style>
|
</Style>
|
||||||
|
|
||||||
<Color x:Key="ResultItemHighlightBackgroundColor">#543BFD</Color>
|
|
||||||
|
|
||||||
<!-- Item Style -->
|
<!-- Item Style -->
|
||||||
<Style x:Key="ItemTitleStyle" TargetType="{x:Type TextBlock}" >
|
<Style x:Key="ItemTitleStyle" TargetType="{x:Type TextBlock}" >
|
||||||
@@ -34,9 +33,13 @@
|
|||||||
<Style x:Key="ItemSubTitleStyle" TargetType="{x:Type TextBlock}" >
|
<Style x:Key="ItemSubTitleStyle" TargetType="{x:Type TextBlock}" >
|
||||||
<Setter Property="Foreground" Value="#B3B2B0"></Setter>
|
<Setter Property="Foreground" Value="#B3B2B0"></Setter>
|
||||||
</Style>
|
</Style>
|
||||||
<Style x:Key="ItemStyle" TargetType="{x:Type UserControl}" >
|
<Style x:Key="ItemTitleSelectedStyle" TargetType="{x:Type TextBlock}">
|
||||||
<Setter Property="Background" Value="Transparent"></Setter>
|
<Setter Property="Foreground" Value="#F6F6FF" />
|
||||||
</Style>
|
</Style>
|
||||||
|
<Style x:Key="ItemSubTitleSelectedStyle" TargetType="{x:Type TextBlock}">
|
||||||
|
<Setter Property="Foreground" Value="#F6F6FF" />
|
||||||
|
</Style>
|
||||||
|
<Color x:Key="ResultItemHighlightBackgroundColor">#543BFD</Color>
|
||||||
|
|
||||||
<Style x:Key="listboxStyle" TargetType="{x:Type ListBox}">
|
<Style x:Key="listboxStyle" TargetType="{x:Type ListBox}">
|
||||||
<Setter Property="BorderBrush" Value="Transparent"/>
|
<Setter Property="BorderBrush" Value="Transparent"/>
|
||||||
@@ -128,4 +131,4 @@
|
|||||||
</Setter>
|
</Setter>
|
||||||
|
|
||||||
</Style>
|
</Style>
|
||||||
</ResourceDictionary>
|
</ResourceDictionary>
|
||||||
Reference in New Issue
Block a user