- WindowChrome: resizable, snap layouts, native shadow, DWM rounded corners; size/position remembered; fade-in after load (no theme flash) - Menu bar replaced by a settings window (theme system/light/dark, language, sound, autostart, categories, data, shortcuts, about) - Shared styles in Themes/Controls.xaml; neutral palette with one accent applied to Application.Resources (context menus/tooltips themed) - Rows: To-Do style check left, title + details, relative date right, actions on hover, visible selection (Enter edits, Del deletes) - No glow/scale effects; subtle animations (dialogs, snackbar, chevrons) - Checking a recurring task moves it to the next date (with undo) - Themed combo box, date picker, check box; neutral dialog headers - New flat app icon (tools/make_icon.py) Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
168 lines
10 KiB
XML
168 lines
10 KiB
XML
<Window x:Class="ReminderOrganizer.CategoryWindow"
|
|
xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
|
|
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
|
|
Title="{Binding [Categories]}"
|
|
Width="780" SizeToContent="Height" MaxHeight="720"
|
|
WindowStartupLocation="CenterOwner"
|
|
ResizeMode="NoResize"
|
|
ShowInTaskbar="False"
|
|
WindowStyle="None"
|
|
AllowsTransparency="True"
|
|
Background="Transparent"
|
|
MouseLeftButtonDown="Window_MouseLeftButtonDown">
|
|
<Window.Resources>
|
|
<SolidColorBrush x:Key="PrimaryBrush" Color="#6366F1"/>
|
|
<SolidColorBrush x:Key="DangerBrush" Color="#EF4444"/>
|
|
<SolidColorBrush x:Key="TextPrimaryBrush" Color="#1E293B"/>
|
|
<SolidColorBrush x:Key="TextSecondaryBrush" Color="#64748B"/>
|
|
<SolidColorBrush x:Key="BorderBrush" Color="#CBD5E1"/>
|
|
<SolidColorBrush x:Key="CardBrush" Color="#FFFFFF"/>
|
|
<SolidColorBrush x:Key="InputBackgroundBrush" Color="#F1F5F9"/>
|
|
<SolidColorBrush x:Key="HoverBrush" Color="#E2E8F0"/>
|
|
|
|
<Style x:Key="Input" TargetType="TextBox">
|
|
<Setter Property="Background" Value="{DynamicResource InputBackgroundBrush}"/>
|
|
<Setter Property="Foreground" Value="{DynamicResource TextPrimaryBrush}"/>
|
|
<Setter Property="CaretBrush" Value="{DynamicResource TextPrimaryBrush}"/>
|
|
<Setter Property="BorderBrush" Value="{DynamicResource BorderBrush}"/>
|
|
<Setter Property="BorderThickness" Value="1"/>
|
|
<Setter Property="Padding" Value="8,5"/>
|
|
<Setter Property="FontSize" Value="13"/>
|
|
<Setter Property="VerticalContentAlignment" Value="Center"/>
|
|
</Style>
|
|
|
|
<Style x:Key="DialogButton" TargetType="Button">
|
|
<Setter Property="Background" Value="Transparent"/>
|
|
<Setter Property="Foreground" Value="{DynamicResource TextPrimaryBrush}"/>
|
|
<Setter Property="BorderBrush" Value="{DynamicResource BorderBrush}"/>
|
|
<Setter Property="BorderThickness" Value="1"/>
|
|
<Setter Property="Padding" Value="18,8"/>
|
|
<Setter Property="Cursor" Value="Hand"/>
|
|
<Setter Property="Template">
|
|
<Setter.Value>
|
|
<ControlTemplate TargetType="Button">
|
|
<Border x:Name="bd" Background="{TemplateBinding Background}" BorderBrush="{TemplateBinding BorderBrush}"
|
|
BorderThickness="{TemplateBinding BorderThickness}" CornerRadius="8" Padding="{TemplateBinding Padding}">
|
|
<ContentPresenter HorizontalAlignment="Center" VerticalAlignment="Center"/>
|
|
</Border>
|
|
<ControlTemplate.Triggers>
|
|
<Trigger Property="IsMouseOver" Value="True">
|
|
<Setter TargetName="bd" Property="Opacity" Value="0.85"/>
|
|
</Trigger>
|
|
<Trigger Property="IsEnabled" Value="False">
|
|
<Setter TargetName="bd" Property="Opacity" Value="0.35"/>
|
|
</Trigger>
|
|
</ControlTemplate.Triggers>
|
|
</ControlTemplate>
|
|
</Setter.Value>
|
|
</Setter>
|
|
</Style>
|
|
</Window.Resources>
|
|
|
|
<Border CornerRadius="10" Background="{DynamicResource CardBrush}" BorderBrush="{DynamicResource BorderBrush}" BorderThickness="1" Margin="10">
|
|
<Border.Effect>
|
|
<DropShadowEffect BlurRadius="20" ShadowDepth="5" Opacity="0.25" Direction="270" Color="Black"/>
|
|
</Border.Effect>
|
|
<Grid>
|
|
<Grid.RowDefinitions>
|
|
<RowDefinition Height="Auto"/>
|
|
<RowDefinition Height="Auto"/>
|
|
<RowDefinition Height="*"/>
|
|
<RowDefinition Height="Auto"/>
|
|
</Grid.RowDefinitions>
|
|
|
|
<!-- Header -->
|
|
<Border Background="Transparent" CornerRadius="12,12,0,0" Padding="20,14,12,6">
|
|
<Grid>
|
|
<StackPanel Orientation="Horizontal">
|
|
<TextBlock Text="" FontFamily="Segoe MDL2 Assets" FontSize="15" Foreground="{DynamicResource TextPrimaryBrush}" VerticalAlignment="Center"/>
|
|
<TextBlock Text="{Binding [Categories]}" FontSize="16" FontWeight="SemiBold" Foreground="{DynamicResource TextPrimaryBrush}" VerticalAlignment="Center"/>
|
|
</StackPanel>
|
|
<Button Content="" Style="{StaticResource IconButton}" FontSize="10" HorizontalAlignment="Right" Click="Cancel_Click" IsCancel="True"/>
|
|
</Grid>
|
|
</Border>
|
|
|
|
<!-- Hint + column titles -->
|
|
<StackPanel Grid.Row="1" Margin="18,14,18,4">
|
|
<TextBlock Text="{Binding [CategoriesHint]}" FontSize="12" TextWrapping="Wrap" Foreground="{DynamicResource TextSecondaryBrush}"/>
|
|
<Grid Margin="0,12,0,0">
|
|
<Grid.ColumnDefinitions>
|
|
<ColumnDefinition Width="56"/>
|
|
<ColumnDefinition Width="56"/>
|
|
<ColumnDefinition Width="*"/>
|
|
<ColumnDefinition Width="170"/>
|
|
<ColumnDefinition Width="190"/>
|
|
<ColumnDefinition Width="34"/>
|
|
</Grid.ColumnDefinitions>
|
|
<TextBlock Grid.Column="0" Text="{Binding [CatIcon]}" FontSize="11" FontWeight="SemiBold" Foreground="{DynamicResource TextSecondaryBrush}"/>
|
|
<TextBlock Grid.Column="1" Text="{Binding [Color]}" FontSize="11" FontWeight="SemiBold" Foreground="{DynamicResource TextSecondaryBrush}"/>
|
|
<TextBlock Grid.Column="2" Text="{Binding [Name]}" FontSize="11" FontWeight="SemiBold" Foreground="{DynamicResource TextSecondaryBrush}"/>
|
|
<TextBlock Grid.Column="3" Text="{Binding [CatText]}" FontSize="11" FontWeight="SemiBold" Foreground="{DynamicResource TextSecondaryBrush}" Margin="8,0,0,0"/>
|
|
<TextBlock Grid.Column="4" Text="{Binding [CatExample]}" FontSize="11" FontWeight="SemiBold" Foreground="{DynamicResource TextSecondaryBrush}" Margin="8,0,0,0"/>
|
|
</Grid>
|
|
</StackPanel>
|
|
|
|
<!-- Rows -->
|
|
<ScrollViewer Grid.Row="2" VerticalScrollBarVisibility="Auto" Margin="18,0,10,0" MaxHeight="440">
|
|
<ItemsControl x:Name="Rows" Margin="0,0,8,0">
|
|
<ItemsControl.ItemTemplate>
|
|
<DataTemplate>
|
|
<Grid Margin="0,4">
|
|
<Grid.ColumnDefinitions>
|
|
<ColumnDefinition Width="56"/>
|
|
<ColumnDefinition Width="56"/>
|
|
<ColumnDefinition Width="*"/>
|
|
<ColumnDefinition Width="170"/>
|
|
<ColumnDefinition Width="190"/>
|
|
<ColumnDefinition Width="34"/>
|
|
</Grid.ColumnDefinitions>
|
|
|
|
<ComboBox Grid.Column="0" Width="50" Height="30" HorizontalAlignment="Left"
|
|
ItemsSource="{Binding Glyphs, RelativeSource={RelativeSource AncestorType=Window}}"
|
|
SelectedItem="{Binding Glyph}">
|
|
<ComboBox.ItemTemplate>
|
|
<DataTemplate>
|
|
<TextBlock Text="{Binding}" FontFamily="Segoe MDL2 Assets" FontSize="14"/>
|
|
</DataTemplate>
|
|
</ComboBox.ItemTemplate>
|
|
</ComboBox>
|
|
|
|
<ComboBox Grid.Column="1" Width="50" Height="30" HorizontalAlignment="Left"
|
|
ItemsSource="{Binding Palette, RelativeSource={RelativeSource AncestorType=Window}}"
|
|
SelectedItem="{Binding Color}">
|
|
<ComboBox.ItemTemplate>
|
|
<DataTemplate>
|
|
<Ellipse Width="14" Height="14" Fill="{Binding Converter={StaticResource HexToBrush}}"/>
|
|
</DataTemplate>
|
|
</ComboBox.ItemTemplate>
|
|
</ComboBox>
|
|
|
|
<TextBox Grid.Column="2" Text="{Binding Name, UpdateSourceTrigger=PropertyChanged}" Style="{StaticResource Input}"/>
|
|
<TextBox Grid.Column="3" Text="{Binding Format, UpdateSourceTrigger=PropertyChanged}" Style="{StaticResource Input}" Margin="8,0,0,0"/>
|
|
|
|
<TextBlock Grid.Column="4" Margin="8,0,0,0" VerticalAlignment="Center" FontSize="11" TextTrimming="CharacterEllipsis"
|
|
Foreground="{Binding Color, Converter={StaticResource HexToBrush}}"
|
|
Loaded="Example_Loaded" Tag="{Binding}"/>
|
|
|
|
<Button Grid.Column="5" Content="" FontFamily="Segoe MDL2 Assets" FontSize="12" Width="28" Height="28"
|
|
Background="Transparent" BorderThickness="0" Cursor="Hand" Foreground="{DynamicResource DangerBrush}"
|
|
Click="Delete_Click" Tag="{Binding}" ToolTip="{Binding DataContext[Delete], RelativeSource={RelativeSource AncestorType=Window}}"/>
|
|
</Grid>
|
|
</DataTemplate>
|
|
</ItemsControl.ItemTemplate>
|
|
</ItemsControl>
|
|
</ScrollViewer>
|
|
|
|
<!-- Buttons -->
|
|
<DockPanel Grid.Row="3" Margin="18,12,18,18">
|
|
<Button DockPanel.Dock="Left" Content="{Binding [AddCategory]}" Style="{StaticResource DialogButton}" Click="Add_Click"/>
|
|
<StackPanel Orientation="Horizontal" HorizontalAlignment="Right">
|
|
<Button Content="{Binding [Cancel]}" Style="{StaticResource DialogButton}" Click="Cancel_Click"/>
|
|
<Button Content="{Binding [Save]}" Style="{StaticResource DialogButton}" Click="Save_Click" IsDefault="True"
|
|
Background="{DynamicResource PrimaryBrush}" Foreground="White" BorderThickness="0" Margin="8,0,0,0"/>
|
|
</StackPanel>
|
|
</DockPanel>
|
|
</Grid>
|
|
</Border>
|
|
</Window>
|