Polish launcher visual design
This commit is contained in:
@@ -2,8 +2,8 @@
|
||||
xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
|
||||
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
|
||||
Title="About Taskbar Launcher"
|
||||
Height="410"
|
||||
Width="560"
|
||||
Height="430"
|
||||
Width="580"
|
||||
ResizeMode="NoResize"
|
||||
WindowStartupLocation="CenterOwner"
|
||||
Background="{DynamicResource AppWindowBrush}"
|
||||
@@ -15,6 +15,11 @@
|
||||
<RowDefinition Height="Auto"/>
|
||||
</Grid.RowDefinitions>
|
||||
|
||||
<Border Background="{DynamicResource AppPanelBrush}"
|
||||
BorderBrush="{DynamicResource AppBorderBrush}"
|
||||
BorderThickness="1"
|
||||
CornerRadius="16"
|
||||
Padding="16">
|
||||
<Grid>
|
||||
<Grid.ColumnDefinitions>
|
||||
<ColumnDefinition Width="96"/>
|
||||
@@ -25,7 +30,8 @@
|
||||
Height="76"
|
||||
BorderThickness="1"
|
||||
BorderBrush="{DynamicResource AppAccentBrush}"
|
||||
Background="{DynamicResource AppSurfaceBrush}"
|
||||
Background="{DynamicResource AppOrangeSoftBrush}"
|
||||
CornerRadius="14"
|
||||
HorizontalAlignment="Left"
|
||||
VerticalAlignment="Top">
|
||||
<Image Source="pack://application:,,,/Assets/AboutLogo.png"
|
||||
@@ -42,13 +48,15 @@
|
||||
TextWrapping="Wrap"/>
|
||||
</StackPanel>
|
||||
</Grid>
|
||||
</Border>
|
||||
|
||||
<Border Grid.Row="1"
|
||||
Margin="0,22,0,18"
|
||||
Padding="14"
|
||||
BorderThickness="1"
|
||||
BorderBrush="{DynamicResource AppBorderBrush}"
|
||||
Background="{DynamicResource AppSurfaceBrush}">
|
||||
Background="{DynamicResource AppSurfaceBrush}"
|
||||
CornerRadius="14">
|
||||
<Grid>
|
||||
<Grid.ColumnDefinitions>
|
||||
<ColumnDefinition Width="120"/>
|
||||
@@ -89,6 +97,7 @@
|
||||
<Button Grid.Row="2"
|
||||
Content="Close"
|
||||
Click="Close_Click"
|
||||
Padding="18,8"
|
||||
HorizontalAlignment="Right"/>
|
||||
</Grid>
|
||||
</Window>
|
||||
|
||||
115
App.xaml
115
App.xaml
@@ -5,8 +5,10 @@
|
||||
<Application.Resources>
|
||||
<Style TargetType="Button">
|
||||
<Setter Property="Margin" Value="0,2"/>
|
||||
<Setter Property="Padding" Value="10,8"/>
|
||||
<Setter Property="HorizontalContentAlignment" Value="Left"/>
|
||||
<Setter Property="Padding" Value="12,8"/>
|
||||
<Setter Property="MinHeight" Value="34"/>
|
||||
<Setter Property="HorizontalContentAlignment" Value="Center"/>
|
||||
<Setter Property="VerticalContentAlignment" Value="Center"/>
|
||||
<Setter Property="Background" Value="{DynamicResource AppControlBrush}"/>
|
||||
<Setter Property="Foreground" Value="{DynamicResource AppTextBrush}"/>
|
||||
<Setter Property="BorderBrush" Value="{DynamicResource AppBorderBrush}"/>
|
||||
@@ -17,6 +19,7 @@
|
||||
Background="{TemplateBinding Background}"
|
||||
BorderBrush="{TemplateBinding BorderBrush}"
|
||||
BorderThickness="1"
|
||||
CornerRadius="10"
|
||||
Padding="{TemplateBinding Padding}">
|
||||
<ContentPresenter HorizontalAlignment="{TemplateBinding HorizontalContentAlignment}"
|
||||
VerticalAlignment="{TemplateBinding VerticalContentAlignment}"
|
||||
@@ -24,11 +27,11 @@
|
||||
</Border>
|
||||
<ControlTemplate.Triggers>
|
||||
<Trigger Property="IsMouseOver" Value="True">
|
||||
<Setter TargetName="ButtonBorder" Property="Background" Value="{DynamicResource AppControlBrush}"/>
|
||||
<Setter TargetName="ButtonBorder" Property="Background" Value="{DynamicResource AppControlHoverBrush}"/>
|
||||
<Setter TargetName="ButtonBorder" Property="BorderBrush" Value="{DynamicResource AppAccentBrush}"/>
|
||||
</Trigger>
|
||||
<Trigger Property="IsPressed" Value="True">
|
||||
<Setter TargetName="ButtonBorder" Property="Background" Value="{DynamicResource AppSurfaceBrush}"/>
|
||||
<Setter TargetName="ButtonBorder" Property="Background" Value="{DynamicResource AppAccentSoftBrush}"/>
|
||||
<Setter TargetName="ButtonBorder" Property="BorderBrush" Value="{DynamicResource AppAccentBrush}"/>
|
||||
</Trigger>
|
||||
<Trigger Property="IsEnabled" Value="False">
|
||||
@@ -44,13 +47,42 @@
|
||||
<Setter Property="Foreground" Value="{DynamicResource AppTextBrush}"/>
|
||||
<Setter Property="BorderBrush" Value="{DynamicResource AppBorderBrush}"/>
|
||||
<Setter Property="CaretBrush" Value="{DynamicResource AppAccentBrush}"/>
|
||||
<Setter Property="Padding" Value="9,6"/>
|
||||
<Setter Property="MinHeight" Value="34"/>
|
||||
<Setter Property="Template">
|
||||
<Setter.Value>
|
||||
<ControlTemplate TargetType="TextBox">
|
||||
<Border x:Name="TextBoxBorder"
|
||||
Background="{TemplateBinding Background}"
|
||||
BorderBrush="{TemplateBinding BorderBrush}"
|
||||
BorderThickness="1"
|
||||
CornerRadius="10">
|
||||
<ScrollViewer x:Name="PART_ContentHost"
|
||||
Margin="{TemplateBinding Padding}"/>
|
||||
</Border>
|
||||
<ControlTemplate.Triggers>
|
||||
<Trigger Property="IsMouseOver" Value="True">
|
||||
<Setter TargetName="TextBoxBorder" Property="Background" Value="{DynamicResource AppPanelBrush}"/>
|
||||
<Setter TargetName="TextBoxBorder" Property="BorderBrush" Value="{DynamicResource AppAccentBrush}"/>
|
||||
</Trigger>
|
||||
<Trigger Property="IsKeyboardFocused" Value="True">
|
||||
<Setter TargetName="TextBoxBorder" Property="Background" Value="{DynamicResource AppSurfaceBrush}"/>
|
||||
<Setter TargetName="TextBoxBorder" Property="BorderBrush" Value="{DynamicResource AppAccentBrush}"/>
|
||||
</Trigger>
|
||||
<Trigger Property="IsEnabled" Value="False">
|
||||
<Setter Property="Opacity" Value="0.55"/>
|
||||
</Trigger>
|
||||
</ControlTemplate.Triggers>
|
||||
</ControlTemplate>
|
||||
</Setter.Value>
|
||||
</Setter>
|
||||
</Style>
|
||||
<Style TargetType="ComboBox">
|
||||
<Setter Property="Background" Value="{DynamicResource AppSurfaceBrush}"/>
|
||||
<Setter Property="Foreground" Value="{DynamicResource AppTextBrush}"/>
|
||||
<Setter Property="BorderBrush" Value="{DynamicResource AppBorderBrush}"/>
|
||||
<Setter Property="Padding" Value="6,4"/>
|
||||
<Setter Property="MinHeight" Value="28"/>
|
||||
<Setter Property="Padding" Value="9,6"/>
|
||||
<Setter Property="MinHeight" Value="34"/>
|
||||
<Setter Property="Template">
|
||||
<Setter.Value>
|
||||
<ControlTemplate TargetType="ComboBox">
|
||||
@@ -66,20 +98,21 @@
|
||||
<Border x:Name="ComboToggleBorder"
|
||||
Background="{TemplateBinding Background}"
|
||||
BorderBrush="{TemplateBinding BorderBrush}"
|
||||
BorderThickness="1">
|
||||
BorderThickness="1"
|
||||
CornerRadius="10">
|
||||
<ContentPresenter/>
|
||||
</Border>
|
||||
<ControlTemplate.Triggers>
|
||||
<Trigger Property="IsMouseOver" Value="True">
|
||||
<Setter TargetName="ComboToggleBorder" Property="Background" Value="{DynamicResource AppSurfaceBrush}"/>
|
||||
<Setter TargetName="ComboToggleBorder" Property="Background" Value="{DynamicResource AppPanelBrush}"/>
|
||||
<Setter TargetName="ComboToggleBorder" Property="BorderBrush" Value="{DynamicResource AppAccentBrush}"/>
|
||||
</Trigger>
|
||||
<Trigger Property="IsPressed" Value="True">
|
||||
<Setter TargetName="ComboToggleBorder" Property="Background" Value="{DynamicResource AppSurfaceBrush}"/>
|
||||
<Setter TargetName="ComboToggleBorder" Property="Background" Value="{DynamicResource AppAccentSoftBrush}"/>
|
||||
<Setter TargetName="ComboToggleBorder" Property="BorderBrush" Value="{DynamicResource AppAccentBrush}"/>
|
||||
</Trigger>
|
||||
<Trigger Property="IsChecked" Value="True">
|
||||
<Setter TargetName="ComboToggleBorder" Property="Background" Value="{DynamicResource AppSurfaceBrush}"/>
|
||||
<Setter TargetName="ComboToggleBorder" Property="Background" Value="{DynamicResource AppAccentSoftBrush}"/>
|
||||
<Setter TargetName="ComboToggleBorder" Property="BorderBrush" Value="{DynamicResource AppAccentBrush}"/>
|
||||
</Trigger>
|
||||
</ControlTemplate.Triggers>
|
||||
@@ -114,6 +147,8 @@
|
||||
<Border Background="{DynamicResource AppSurfaceBrush}"
|
||||
BorderBrush="{DynamicResource AppBorderBrush}"
|
||||
BorderThickness="1"
|
||||
CornerRadius="10"
|
||||
Padding="3"
|
||||
MinWidth="{TemplateBinding ActualWidth}"
|
||||
MaxHeight="{TemplateBinding MaxDropDownHeight}">
|
||||
<ScrollViewer>
|
||||
@@ -127,11 +162,11 @@
|
||||
<Setter Property="Opacity" Value="0.55"/>
|
||||
</Trigger>
|
||||
<Trigger SourceName="ToggleButton" Property="IsMouseOver" Value="True">
|
||||
<Setter TargetName="ToggleButton" Property="Background" Value="{DynamicResource AppSurfaceBrush}"/>
|
||||
<Setter TargetName="ToggleButton" Property="Background" Value="{DynamicResource AppPanelBrush}"/>
|
||||
<Setter TargetName="ToggleButton" Property="BorderBrush" Value="{DynamicResource AppAccentBrush}"/>
|
||||
</Trigger>
|
||||
<Trigger SourceName="ToggleButton" Property="IsPressed" Value="True">
|
||||
<Setter TargetName="ToggleButton" Property="Background" Value="{DynamicResource AppSurfaceBrush}"/>
|
||||
<Setter TargetName="ToggleButton" Property="Background" Value="{DynamicResource AppAccentSoftBrush}"/>
|
||||
<Setter TargetName="ToggleButton" Property="BorderBrush" Value="{DynamicResource AppAccentBrush}"/>
|
||||
</Trigger>
|
||||
</ControlTemplate.Triggers>
|
||||
@@ -142,21 +177,24 @@
|
||||
<Style TargetType="ComboBoxItem">
|
||||
<Setter Property="Background" Value="{DynamicResource AppSurfaceBrush}"/>
|
||||
<Setter Property="Foreground" Value="{DynamicResource AppTextBrush}"/>
|
||||
<Setter Property="Padding" Value="6,4"/>
|
||||
<Setter Property="Padding" Value="9,7"/>
|
||||
<Style.Triggers>
|
||||
<Trigger Property="IsHighlighted" Value="True">
|
||||
<Setter Property="Background" Value="{DynamicResource AppAccentBrush}"/>
|
||||
<Setter Property="Foreground" Value="{DynamicResource AppSelectedTextBrush}"/>
|
||||
<Setter Property="Background" Value="{DynamicResource AppAccentSoftBrush}"/>
|
||||
<Setter Property="Foreground" Value="{DynamicResource AppTextBrush}"/>
|
||||
</Trigger>
|
||||
<Trigger Property="IsSelected" Value="True">
|
||||
<Setter Property="Background" Value="{DynamicResource AppAccentBrush}"/>
|
||||
<Setter Property="Foreground" Value="{DynamicResource AppSelectedTextBrush}"/>
|
||||
<Setter Property="Background" Value="{DynamicResource AppAccentSoftBrush}"/>
|
||||
<Setter Property="Foreground" Value="{DynamicResource AppTextBrush}"/>
|
||||
</Trigger>
|
||||
</Style.Triggers>
|
||||
</Style>
|
||||
<Style TargetType="TreeView">
|
||||
<Setter Property="Background" Value="{DynamicResource AppSurfaceBrush}"/>
|
||||
<Setter Property="Foreground" Value="{DynamicResource AppTextBrush}"/>
|
||||
<Setter Property="BorderBrush" Value="{DynamicResource AppBorderBrush}"/>
|
||||
<Setter Property="BorderThickness" Value="1"/>
|
||||
<Setter Property="Padding" Value="8"/>
|
||||
</Style>
|
||||
<Style TargetType="TreeViewItem">
|
||||
<Setter Property="Foreground" Value="{DynamicResource AppTextBrush}"/>
|
||||
@@ -180,6 +218,7 @@
|
||||
<Border Background="{TemplateBinding Background}"
|
||||
BorderBrush="{TemplateBinding BorderBrush}"
|
||||
BorderThickness="{TemplateBinding BorderThickness}"
|
||||
CornerRadius="10"
|
||||
Padding="{TemplateBinding Padding}">
|
||||
<ItemsPresenter/>
|
||||
</Border>
|
||||
@@ -190,22 +229,23 @@
|
||||
<Style TargetType="MenuItem">
|
||||
<Setter Property="Background" Value="{DynamicResource AppSurfaceBrush}"/>
|
||||
<Setter Property="Foreground" Value="{DynamicResource AppTextBrush}"/>
|
||||
<Setter Property="Padding" Value="10,7"/>
|
||||
<Setter Property="Padding" Value="12,8"/>
|
||||
<Setter Property="MinWidth" Value="190"/>
|
||||
<Setter Property="Template">
|
||||
<Setter.Value>
|
||||
<ControlTemplate TargetType="MenuItem">
|
||||
<Border x:Name="MenuItemBorder"
|
||||
Background="{TemplateBinding Background}"
|
||||
Padding="{TemplateBinding Padding}">
|
||||
Padding="{TemplateBinding Padding}"
|
||||
CornerRadius="8">
|
||||
<ContentPresenter ContentSource="Header"
|
||||
RecognizesAccessKey="True"
|
||||
VerticalAlignment="Center"/>
|
||||
</Border>
|
||||
<ControlTemplate.Triggers>
|
||||
<Trigger Property="IsHighlighted" Value="True">
|
||||
<Setter TargetName="MenuItemBorder" Property="Background" Value="{DynamicResource AppAccentBrush}"/>
|
||||
<Setter Property="Foreground" Value="{DynamicResource AppSelectedTextBrush}"/>
|
||||
<Setter TargetName="MenuItemBorder" Property="Background" Value="{DynamicResource AppAccentSoftBrush}"/>
|
||||
<Setter Property="Foreground" Value="{DynamicResource AppTextBrush}"/>
|
||||
</Trigger>
|
||||
<Trigger Property="IsEnabled" Value="False">
|
||||
<Setter Property="Opacity" Value="0.55"/>
|
||||
@@ -228,9 +268,42 @@
|
||||
<Style TargetType="GroupBox">
|
||||
<Setter Property="Foreground" Value="{DynamicResource AppTextBrush}"/>
|
||||
<Setter Property="BorderBrush" Value="{DynamicResource AppBorderBrush}"/>
|
||||
<Setter Property="Padding" Value="12"/>
|
||||
<Setter Property="Template">
|
||||
<Setter.Value>
|
||||
<ControlTemplate TargetType="GroupBox">
|
||||
<Grid>
|
||||
<Grid.RowDefinitions>
|
||||
<RowDefinition Height="Auto"/>
|
||||
<RowDefinition Height="*"/>
|
||||
</Grid.RowDefinitions>
|
||||
<Border Grid.Row="1"
|
||||
Margin="0,8,0,0"
|
||||
Background="{DynamicResource AppSurfaceBrush}"
|
||||
BorderBrush="{TemplateBinding BorderBrush}"
|
||||
BorderThickness="1"
|
||||
CornerRadius="14"
|
||||
Padding="{TemplateBinding Padding}">
|
||||
<ContentPresenter/>
|
||||
</Border>
|
||||
<Border Grid.Row="0"
|
||||
HorizontalAlignment="Left"
|
||||
Background="{DynamicResource AppOrangeSoftBrush}"
|
||||
BorderBrush="{DynamicResource AppBorderBrush}"
|
||||
BorderThickness="1"
|
||||
CornerRadius="999"
|
||||
Padding="10,4">
|
||||
<ContentPresenter ContentSource="Header"
|
||||
RecognizesAccessKey="True"/>
|
||||
</Border>
|
||||
</Grid>
|
||||
</ControlTemplate>
|
||||
</Setter.Value>
|
||||
</Setter>
|
||||
</Style>
|
||||
<Style TargetType="CheckBox">
|
||||
<Setter Property="Foreground" Value="{DynamicResource AppTextBrush}"/>
|
||||
<Setter Property="VerticalContentAlignment" Value="Center"/>
|
||||
</Style>
|
||||
<Style TargetType="Expander">
|
||||
<Setter Property="Foreground" Value="{DynamicResource AppTextBrush}"/>
|
||||
|
||||
@@ -4,21 +4,54 @@
|
||||
xmlns:d="http://schemas.microsoft.com/expression/blend/2008"
|
||||
xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006"
|
||||
mc:Ignorable="d"
|
||||
Title="Taskbar Launcher Settings" Height="700" Width="940"
|
||||
MinHeight="620" MinWidth="820"
|
||||
Title="Taskbar Launcher Settings" Height="740" Width="980"
|
||||
MinHeight="660" MinWidth="860"
|
||||
Background="{DynamicResource AppWindowBrush}"
|
||||
Foreground="{DynamicResource AppTextBrush}">
|
||||
<DockPanel Margin="18">
|
||||
<StackPanel DockPanel.Dock="Top" Margin="0,0,0,14">
|
||||
<TextBlock Text="Taskbar Launcher" FontSize="22" FontWeight="SemiBold"/>
|
||||
<TextBlock x:Name="VersionText"
|
||||
Foreground="{DynamicResource AppMutedTextBrush}"/>
|
||||
<TextBlock Text="Portable launcher settings are stored beside the app in config.json."
|
||||
Foreground="{DynamicResource AppMutedTextBrush}"/>
|
||||
</StackPanel>
|
||||
<Border DockPanel.Dock="Top"
|
||||
Margin="0,0,0,16"
|
||||
Padding="16,14"
|
||||
Background="{DynamicResource AppPanelBrush}"
|
||||
BorderBrush="{DynamicResource AppBorderBrush}"
|
||||
BorderThickness="1"
|
||||
CornerRadius="16">
|
||||
<Grid>
|
||||
<Grid.ColumnDefinitions>
|
||||
<ColumnDefinition Width="Auto"/>
|
||||
<ColumnDefinition Width="*"/>
|
||||
</Grid.ColumnDefinitions>
|
||||
<Border Width="46"
|
||||
Height="46"
|
||||
Margin="0,0,12,0"
|
||||
Background="{DynamicResource AppOrangeSoftBrush}"
|
||||
BorderBrush="{DynamicResource AppBorderBrush}"
|
||||
BorderThickness="1"
|
||||
CornerRadius="12">
|
||||
<Image Source="pack://application:,,,/Assets/TrayIcon.ico"
|
||||
Width="30"
|
||||
Height="30"
|
||||
Stretch="Uniform"/>
|
||||
</Border>
|
||||
<StackPanel Grid.Column="1" VerticalAlignment="Center">
|
||||
<TextBlock Text="Taskbar Launcher" FontSize="23" FontWeight="SemiBold"/>
|
||||
<TextBlock x:Name="VersionText"
|
||||
Margin="0,2,0,0"
|
||||
Foreground="{DynamicResource AppMutedTextBrush}"/>
|
||||
<TextBlock Text="Portable launcher settings are stored beside the app in config.json."
|
||||
Margin="0,2,0,0"
|
||||
Foreground="{DynamicResource AppMutedTextBrush}"/>
|
||||
</StackPanel>
|
||||
</Grid>
|
||||
</Border>
|
||||
|
||||
<Border DockPanel.Dock="Bottom" BorderThickness="1,0,0,0" Padding="0,12,0,0"
|
||||
BorderBrush="{DynamicResource AppBorderBrush}">
|
||||
<Border DockPanel.Dock="Bottom"
|
||||
Margin="0,16,0,0"
|
||||
Padding="12"
|
||||
Background="{DynamicResource AppPanelBrush}"
|
||||
BorderBrush="{DynamicResource AppBorderBrush}"
|
||||
BorderThickness="1"
|
||||
CornerRadius="14">
|
||||
<WrapPanel HorizontalAlignment="Right">
|
||||
<Button Content="Save" Click="Save_Click" Margin="0,0,8,0"/>
|
||||
<Button x:Name="ConfigMenuButton"
|
||||
@@ -50,9 +83,9 @@
|
||||
<ColumnDefinition Width="3*"/>
|
||||
</Grid.ColumnDefinitions>
|
||||
|
||||
<GroupBox Header="Launcher Items" Margin="0,0,12,0">
|
||||
<DockPanel Margin="8">
|
||||
<UniformGrid DockPanel.Dock="Bottom" Columns="2" Margin="0,8,0,0">
|
||||
<GroupBox Header="Launcher Items" Margin="0,0,14,0">
|
||||
<DockPanel>
|
||||
<UniformGrid DockPanel.Dock="Bottom" Columns="2" Margin="0,10,0,0">
|
||||
<Button Content="Add Root" Click="AddRoot_Click"/>
|
||||
<Button Content="Add Top Menu" Click="AddTopMenu_Click"/>
|
||||
<Button Content="Add Child" Click="AddChild_Click"/>
|
||||
@@ -65,6 +98,7 @@
|
||||
</UniformGrid>
|
||||
<TreeView x:Name="ItemsTree"
|
||||
AllowDrop="True"
|
||||
Margin="0"
|
||||
SelectedItemChanged="ItemsTree_SelectedItemChanged"
|
||||
PreviewMouseMove="ItemsTree_PreviewMouseMove"
|
||||
DragOver="ItemsTree_DragOver"
|
||||
@@ -73,7 +107,7 @@
|
||||
</GroupBox>
|
||||
|
||||
<GroupBox Header="Settings" Grid.Column="1">
|
||||
<Grid Margin="12">
|
||||
<Grid>
|
||||
<Grid.RowDefinitions>
|
||||
<RowDefinition Height="Auto"/>
|
||||
<RowDefinition Height="16"/>
|
||||
@@ -81,6 +115,11 @@
|
||||
<RowDefinition Height="*"/>
|
||||
</Grid.RowDefinitions>
|
||||
|
||||
<Border Background="{DynamicResource AppPanelBrush}"
|
||||
BorderBrush="{DynamicResource AppBorderBrush}"
|
||||
BorderThickness="1"
|
||||
CornerRadius="12"
|
||||
Padding="12">
|
||||
<Grid>
|
||||
<Grid.ColumnDefinitions>
|
||||
<ColumnDefinition Width="110"/>
|
||||
@@ -106,10 +145,17 @@
|
||||
Checked="StartWithWindowsBox_Changed"
|
||||
Unchecked="StartWithWindowsBox_Changed"/>
|
||||
</Grid>
|
||||
</Border>
|
||||
|
||||
<Separator Grid.Row="1" VerticalAlignment="Center"/>
|
||||
|
||||
<Grid Grid.Row="2">
|
||||
<Border Grid.Row="2"
|
||||
Background="{DynamicResource AppPanelBrush}"
|
||||
BorderBrush="{DynamicResource AppBorderBrush}"
|
||||
BorderThickness="1"
|
||||
CornerRadius="12"
|
||||
Padding="12">
|
||||
<Grid>
|
||||
<Grid.ColumnDefinitions>
|
||||
<ColumnDefinition Width="110"/>
|
||||
<ColumnDefinition Width="*"/>
|
||||
@@ -161,8 +207,9 @@
|
||||
<Border Grid.Row="6" Grid.Column="1" Grid.ColumnSpan="2"
|
||||
BorderThickness="1"
|
||||
BorderBrush="{DynamicResource AppBorderBrush}"
|
||||
Background="{DynamicResource AppControlBrush}"
|
||||
Padding="8" MinHeight="72">
|
||||
Background="{DynamicResource AppSurfaceBrush}"
|
||||
CornerRadius="12"
|
||||
Padding="10" MinHeight="76">
|
||||
<StackPanel>
|
||||
<ContentControl x:Name="PreviewHost"/>
|
||||
<TextBlock x:Name="PreviewNote" Margin="0,8,0,0"
|
||||
@@ -171,8 +218,9 @@
|
||||
</StackPanel>
|
||||
</Border>
|
||||
</Grid>
|
||||
</Border>
|
||||
|
||||
<TextBlock x:Name="StatusText" Grid.Row="3" Margin="0,14,0,0"
|
||||
<TextBlock x:Name="StatusText" Grid.Row="3" Margin="4,14,4,0"
|
||||
Foreground="{DynamicResource AppMutedTextBrush}"
|
||||
TextWrapping="Wrap"/>
|
||||
</Grid>
|
||||
|
||||
@@ -14,23 +14,31 @@ public static class ThemeService
|
||||
{
|
||||
bool isLight = IsLightTheme();
|
||||
MediaColor accent = GetAccentColor();
|
||||
MediaColor window = isLight ? MediaColor.FromRgb(0xF7, 0xF7, 0xF7) : MediaColor.FromRgb(0x20, 0x20, 0x20);
|
||||
MediaColor surface = isLight ? System.Windows.Media.Colors.White : MediaColor.FromRgb(0x2B, 0x2B, 0x2B);
|
||||
MediaColor control = isLight ? MediaColor.FromRgb(0xF3, 0xF3, 0xF3) : MediaColor.FromRgb(0x33, 0x33, 0x33);
|
||||
MediaColor hover = isLight ? MediaColor.FromRgb(0xEA, 0xF3, 0xFF) : MediaColor.FromRgb(0x3B, 0x4A, 0x5C);
|
||||
MediaColor text = isLight ? MediaColor.FromRgb(0x1A, 0x1A, 0x1A) : MediaColor.FromRgb(0xF3, 0xF3, 0xF3);
|
||||
MediaColor muted = isLight ? MediaColor.FromRgb(0x66, 0x66, 0x66) : MediaColor.FromRgb(0xB8, 0xB8, 0xB8);
|
||||
MediaColor border = isLight ? MediaColor.FromRgb(0xC8, 0xC8, 0xC8) : MediaColor.FromRgb(0x55, 0x55, 0x55);
|
||||
MediaColor orange = MediaColor.FromRgb(0xD8, 0x78, 0x1D);
|
||||
MediaColor window = isLight ? MediaColor.FromRgb(0xF6, 0xF1, 0xEA) : MediaColor.FromRgb(0x18, 0x16, 0x14);
|
||||
MediaColor surface = isLight ? MediaColor.FromRgb(0xFF, 0xFC, 0xF8) : MediaColor.FromRgb(0x22, 0x1F, 0x1B);
|
||||
MediaColor panel = isLight ? MediaColor.FromRgb(0xFF, 0xF7, 0xEE) : MediaColor.FromRgb(0x2A, 0x24, 0x1E);
|
||||
MediaColor control = isLight ? MediaColor.FromRgb(0xFA, 0xF1, 0xE7) : MediaColor.FromRgb(0x32, 0x2B, 0x24);
|
||||
MediaColor hover = isLight ? MediaColor.FromRgb(0xFF, 0xED, 0xDA) : MediaColor.FromRgb(0x42, 0x34, 0x28);
|
||||
MediaColor text = isLight ? MediaColor.FromRgb(0x24, 0x1D, 0x17) : MediaColor.FromRgb(0xF8, 0xF2, 0xEA);
|
||||
MediaColor muted = isLight ? MediaColor.FromRgb(0x75, 0x68, 0x5C) : MediaColor.FromRgb(0xC3, 0xB5, 0xA6);
|
||||
MediaColor border = isLight ? MediaColor.FromRgb(0xE4, 0xD1, 0xBC) : MediaColor.FromRgb(0x5B, 0x4B, 0x3C);
|
||||
MediaColor accentSoft = Blend(accent, surface, isLight ? 0.14 : 0.24);
|
||||
MediaColor orangeSoft = Blend(orange, surface, isLight ? 0.16 : 0.30);
|
||||
MediaColor selectedText = IsDark(accent) ? System.Windows.Media.Colors.White : System.Windows.Media.Colors.Black;
|
||||
|
||||
SetBrush("AppWindowBrush", window);
|
||||
SetBrush("AppSurfaceBrush", surface);
|
||||
SetBrush("AppPanelBrush", panel);
|
||||
SetBrush("AppControlBrush", control);
|
||||
SetBrush("AppControlHoverBrush", hover);
|
||||
SetBrush("AppTextBrush", text);
|
||||
SetBrush("AppMutedTextBrush", muted);
|
||||
SetBrush("AppBorderBrush", border);
|
||||
SetBrush("AppAccentBrush", accent);
|
||||
SetBrush("AppAccentSoftBrush", accentSoft);
|
||||
SetBrush("AppOrangeBrush", orange);
|
||||
SetBrush("AppOrangeSoftBrush", orangeSoft);
|
||||
SetBrush("AppSelectedTextBrush", selectedText);
|
||||
|
||||
SetBrush(System.Windows.SystemColors.WindowBrushKey, surface);
|
||||
@@ -62,6 +70,15 @@ public static class ThemeService
|
||||
return MediaColor.FromRgb(0x00, 0x78, 0xD4);
|
||||
}
|
||||
|
||||
private static MediaColor Blend(MediaColor foreground, MediaColor background, double foregroundAmount)
|
||||
{
|
||||
double amount = Math.Clamp(foregroundAmount, 0, 1);
|
||||
byte r = (byte)Math.Round((foreground.R * amount) + (background.R * (1 - amount)));
|
||||
byte g = (byte)Math.Round((foreground.G * amount) + (background.G * (1 - amount)));
|
||||
byte b = (byte)Math.Round((foreground.B * amount) + (background.B * (1 - amount)));
|
||||
return MediaColor.FromRgb(r, g, b);
|
||||
}
|
||||
|
||||
private static void SetBrush(string key, MediaColor color)
|
||||
{
|
||||
SolidColorBrush brush = new(color);
|
||||
|
||||
@@ -2,7 +2,7 @@
|
||||
xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
|
||||
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
|
||||
Title="Taskbar Launcher"
|
||||
Width="360" SizeToContent="Height"
|
||||
Width="380" SizeToContent="Height"
|
||||
MaxHeight="720"
|
||||
WindowStyle="None"
|
||||
ResizeMode="NoResize"
|
||||
@@ -13,18 +13,19 @@
|
||||
<Border BorderThickness="1"
|
||||
BorderBrush="{DynamicResource AppBorderBrush}"
|
||||
Background="{DynamicResource AppSurfaceBrush}"
|
||||
Padding="10">
|
||||
CornerRadius="16"
|
||||
Padding="12">
|
||||
<DockPanel>
|
||||
<Grid DockPanel.Dock="Top" Margin="0,0,0,8">
|
||||
<Grid DockPanel.Dock="Top" Margin="0,0,0,10">
|
||||
<Grid.ColumnDefinitions>
|
||||
<ColumnDefinition Width="Auto"/>
|
||||
<ColumnDefinition Width="*"/>
|
||||
<ColumnDefinition Width="Auto"/>
|
||||
</Grid.ColumnDefinitions>
|
||||
<Image Source="pack://application:,,,/Assets/TrayIcon.ico"
|
||||
Width="18"
|
||||
Height="18"
|
||||
Margin="0,0,8,0"
|
||||
Width="22"
|
||||
Height="22"
|
||||
Margin="2,0,10,0"
|
||||
VerticalAlignment="Center"/>
|
||||
<TextBlock Grid.Column="1"
|
||||
Text="Taskbar Launcher"
|
||||
@@ -33,13 +34,13 @@
|
||||
<Button Grid.Column="2"
|
||||
Content="Settings"
|
||||
HorizontalAlignment="Right"
|
||||
Padding="8,4"
|
||||
Padding="10,5"
|
||||
Click="Settings_Click"/>
|
||||
</Grid>
|
||||
<TextBox x:Name="SearchBox"
|
||||
DockPanel.Dock="Top"
|
||||
Margin="0,0,0,8"
|
||||
Padding="8,5"
|
||||
Margin="0,0,0,10"
|
||||
Padding="10,6"
|
||||
TextChanged="SearchBox_TextChanged"
|
||||
PreviewKeyDown="SearchBox_PreviewKeyDown"/>
|
||||
<ScrollViewer x:Name="ItemsScrollViewer"
|
||||
|
||||
@@ -124,6 +124,7 @@ public partial class LauncherPopup : Window
|
||||
Content = CreateButtonContent(item),
|
||||
Margin = new Thickness(depth * 12, 2, 0, 2),
|
||||
MinHeight = DisplayModeMetrics.GetRowHeight(GetEffectiveDisplayMode(item)),
|
||||
HorizontalContentAlignment = System.Windows.HorizontalAlignment.Left,
|
||||
Tag = item
|
||||
};
|
||||
|
||||
|
||||
Reference in New Issue
Block a user