- 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>
237 lines
17 KiB
XML
237 lines
17 KiB
XML
<Window x:Class="ReminderOrganizer.SettingsWindow"
|
|
xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
|
|
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
|
|
Title="{Binding [Settings]}"
|
|
Width="620" Height="680"
|
|
WindowStartupLocation="CenterOwner" ResizeMode="NoResize" ShowInTaskbar="False"
|
|
WindowStyle="None" AllowsTransparency="True" Background="Transparent"
|
|
FontFamily="{StaticResource UiFont}" FontSize="13" Foreground="{DynamicResource TextPrimaryBrush}"
|
|
UseLayoutRounding="True"
|
|
MouseLeftButtonDown="Window_MouseLeftButtonDown" KeyDown="Window_KeyDown">
|
|
<Window.Resources>
|
|
<!-- one settings group -->
|
|
<Style x:Key="Group" TargetType="Border">
|
|
<Setter Property="Background" Value="{DynamicResource BackgroundBrush}"/>
|
|
<Setter Property="BorderBrush" Value="{DynamicResource DividerBrush}"/>
|
|
<Setter Property="BorderThickness" Value="1"/>
|
|
<Setter Property="CornerRadius" Value="8"/>
|
|
<Setter Property="Margin" Value="0,0,0,18"/>
|
|
</Style>
|
|
<Style x:Key="GroupTitle" TargetType="TextBlock">
|
|
<Setter Property="FontSize" Value="13"/>
|
|
<Setter Property="FontWeight" Value="SemiBold"/>
|
|
<Setter Property="Margin" Value="2,0,0,8"/>
|
|
</Style>
|
|
<!-- one row inside a group: label left, control right -->
|
|
<Style x:Key="Row" TargetType="DockPanel">
|
|
<Setter Property="Margin" Value="16,12"/>
|
|
<Setter Property="LastChildFill" Value="False"/>
|
|
</Style>
|
|
<Style x:Key="RowLabel" TargetType="TextBlock">
|
|
<Setter Property="VerticalAlignment" Value="Center"/>
|
|
<Setter Property="DockPanel.Dock" Value="Left"/>
|
|
</Style>
|
|
<Style x:Key="RowHint" TargetType="TextBlock">
|
|
<Setter Property="FontSize" Value="12"/>
|
|
<Setter Property="Foreground" Value="{DynamicResource TextSecondaryBrush}"/>
|
|
<Setter Property="TextWrapping" Value="Wrap"/>
|
|
<Setter Property="Margin" Value="0,2,0,0"/>
|
|
</Style>
|
|
<Style x:Key="Divider" TargetType="Border">
|
|
<Setter Property="Height" Value="1"/>
|
|
<Setter Property="Background" Value="{DynamicResource DividerBrush}"/>
|
|
</Style>
|
|
<Style x:Key="Key" TargetType="Border">
|
|
<Setter Property="CornerRadius" Value="4"/>
|
|
<Setter Property="BorderThickness" Value="1"/>
|
|
<Setter Property="BorderBrush" Value="{DynamicResource BorderBrush}"/>
|
|
<Setter Property="Background" Value="{DynamicResource CardBrush}"/>
|
|
<Setter Property="Padding" Value="6,1"/>
|
|
<Setter Property="Margin" Value="0,0,4,0"/>
|
|
</Style>
|
|
</Window.Resources>
|
|
|
|
<Border Margin="10" CornerRadius="10" Background="{DynamicResource CardBrush}" BorderBrush="{DynamicResource BorderBrush}" BorderThickness="1">
|
|
<Border.Effect>
|
|
<DropShadowEffect BlurRadius="24" ShadowDepth="6" Opacity="0.28" Direction="270" Color="Black"/>
|
|
</Border.Effect>
|
|
<Grid>
|
|
<Grid.RowDefinitions>
|
|
<RowDefinition Height="Auto"/>
|
|
<RowDefinition Height="*"/>
|
|
</Grid.RowDefinitions>
|
|
|
|
<!-- header -->
|
|
<DockPanel Margin="24,18,14,8">
|
|
<Button DockPanel.Dock="Right" Content="" Style="{StaticResource IconButton}" FontSize="10" Click="Close_Click" ToolTip="Esc"/>
|
|
<TextBlock Text="{Binding [Settings]}" FontSize="18" FontWeight="SemiBold" VerticalAlignment="Center"/>
|
|
</DockPanel>
|
|
|
|
<ScrollViewer Grid.Row="1" VerticalScrollBarVisibility="Auto" Padding="24,8,20,20">
|
|
<StackPanel>
|
|
|
|
<!-- appearance -->
|
|
<TextBlock Text="{Binding [SetAppearance]}" Style="{StaticResource GroupTitle}"/>
|
|
<Border Style="{StaticResource Group}">
|
|
<StackPanel>
|
|
<DockPanel Style="{StaticResource Row}">
|
|
<TextBlock Text="{Binding [SetTheme]}" Style="{StaticResource RowLabel}"/>
|
|
<Border DockPanel.Dock="Right" Style="{StaticResource SegmentHost}">
|
|
<StackPanel Orientation="Horizontal">
|
|
<RadioButton GroupName="theme" Content="{Binding [ThemeSystem]}" IsChecked="{Binding IsThemeSystem}" Style="{StaticResource Segment}"/>
|
|
<RadioButton GroupName="theme" Content="{Binding [LightMode]}" IsChecked="{Binding IsThemeLight}" Style="{StaticResource Segment}"/>
|
|
<RadioButton GroupName="theme" Content="{Binding [DarkMode]}" IsChecked="{Binding IsThemeDark}" Style="{StaticResource Segment}"/>
|
|
</StackPanel>
|
|
</Border>
|
|
</DockPanel>
|
|
<Border Style="{StaticResource Divider}"/>
|
|
<DockPanel Style="{StaticResource Row}">
|
|
<TextBlock Text="{Binding [Language]}" Style="{StaticResource RowLabel}"/>
|
|
<Border DockPanel.Dock="Right" Style="{StaticResource SegmentHost}">
|
|
<StackPanel Orientation="Horizontal">
|
|
<RadioButton GroupName="lang" Content="Deutsch" IsChecked="{Binding IsGerman}" Style="{StaticResource Segment}"/>
|
|
<RadioButton GroupName="lang" Content="English" IsChecked="{Binding IsEnglish}" Style="{StaticResource Segment}"/>
|
|
</StackPanel>
|
|
</Border>
|
|
</DockPanel>
|
|
</StackPanel>
|
|
</Border>
|
|
|
|
<!-- reminders -->
|
|
<TextBlock Text="{Binding [SetReminders]}" Style="{StaticResource GroupTitle}"/>
|
|
<Border Style="{StaticResource Group}">
|
|
<StackPanel>
|
|
<DockPanel Style="{StaticResource Row}">
|
|
<StackPanel DockPanel.Dock="Left" MaxWidth="360">
|
|
<TextBlock Text="{Binding [PlaySound]}"/>
|
|
<TextBlock Text="{Binding [PlaySoundHint]}" Style="{StaticResource RowHint}"/>
|
|
</StackPanel>
|
|
<CheckBox DockPanel.Dock="Right" Style="{StaticResource ToggleSwitch}" IsChecked="{Binding PlaySound}" VerticalAlignment="Center"/>
|
|
</DockPanel>
|
|
<Border Style="{StaticResource Divider}"/>
|
|
<DockPanel Style="{StaticResource Row}">
|
|
<StackPanel DockPanel.Dock="Left" MaxWidth="360">
|
|
<TextBlock Text="{Binding [Autostart]}"/>
|
|
<TextBlock Text="{Binding [AutostartHint]}" Style="{StaticResource RowHint}"/>
|
|
</StackPanel>
|
|
<CheckBox DockPanel.Dock="Right" Style="{StaticResource ToggleSwitch}" IsChecked="{Binding IsAutostartEnabled}" VerticalAlignment="Center"/>
|
|
</DockPanel>
|
|
<Border Style="{StaticResource Divider}"/>
|
|
<DockPanel Style="{StaticResource Row}">
|
|
<TextBlock Text="{Binding [TestNotificationHint]}" Style="{StaticResource RowLabel}"/>
|
|
<Button DockPanel.Dock="Right" Content="{Binding [TestNow]}" Style="{StaticResource SubtleButton}" Command="{Binding TestNotificationCommand}"/>
|
|
</DockPanel>
|
|
</StackPanel>
|
|
</Border>
|
|
|
|
<!-- categories -->
|
|
<TextBlock Text="{Binding [Categories]}" Style="{StaticResource GroupTitle}"/>
|
|
<Border Style="{StaticResource Group}">
|
|
<DockPanel Style="{StaticResource Row}">
|
|
<StackPanel DockPanel.Dock="Left" MaxWidth="360">
|
|
<TextBlock Text="{Binding [CategoriesShort]}" TextWrapping="Wrap"/>
|
|
<ItemsControl ItemsSource="{Binding Categories}" Margin="0,8,0,0">
|
|
<ItemsControl.ItemsPanel>
|
|
<ItemsPanelTemplate><WrapPanel/></ItemsPanelTemplate>
|
|
</ItemsControl.ItemsPanel>
|
|
<ItemsControl.ItemTemplate>
|
|
<DataTemplate>
|
|
<Border CornerRadius="10" Padding="8,2" Margin="0,0,6,6" Background="{Binding Color, Converter={StaticResource HexToBrush}, ConverterParameter=0.14}">
|
|
<StackPanel Orientation="Horizontal">
|
|
<TextBlock Text="{Binding Glyph}" FontFamily="{StaticResource IconFont}" FontSize="11" VerticalAlignment="Center"
|
|
Foreground="{Binding Color, Converter={StaticResource HexToBrush}}"/>
|
|
<TextBlock Text="{Binding Name}" FontSize="12" Margin="6,0,0,0"/>
|
|
</StackPanel>
|
|
</Border>
|
|
</DataTemplate>
|
|
</ItemsControl.ItemTemplate>
|
|
</ItemsControl>
|
|
</StackPanel>
|
|
<Button DockPanel.Dock="Right" Content="{Binding [EditCategoriesButton]}" Style="{StaticResource SubtleButton}"
|
|
Command="{Binding EditCategoriesCommand}" VerticalAlignment="Top"/>
|
|
</DockPanel>
|
|
</Border>
|
|
|
|
<!-- data -->
|
|
<TextBlock Text="{Binding [SetData]}" Style="{StaticResource GroupTitle}"/>
|
|
<Border Style="{StaticResource Group}">
|
|
<StackPanel>
|
|
<DockPanel Style="{StaticResource Row}">
|
|
<StackPanel DockPanel.Dock="Left" MaxWidth="330">
|
|
<TextBlock Text="{Binding [SetDataFolder]}"/>
|
|
<TextBlock Text="{Binding DataFolder}" Style="{StaticResource RowHint}" TextTrimming="CharacterEllipsis" TextWrapping="NoWrap"
|
|
ToolTip="{Binding DataFolder}"/>
|
|
</StackPanel>
|
|
<Button DockPanel.Dock="Right" Content="{Binding [OpenFolder]}" Style="{StaticResource SubtleButton}" Command="{Binding OpenDataFolderCommand}"/>
|
|
</DockPanel>
|
|
<Border Style="{StaticResource Divider}"/>
|
|
<DockPanel Style="{StaticResource Row}">
|
|
<TextBlock Text="CSV" Style="{StaticResource RowLabel}"/>
|
|
<StackPanel DockPanel.Dock="Right" Orientation="Horizontal">
|
|
<Button Content="{Binding [Import]}" Style="{StaticResource SubtleButton}" Command="{Binding ImportCsvCommand}" Margin="0,0,8,0"/>
|
|
<Button Content="{Binding [Export]}" Style="{StaticResource SubtleButton}" Command="{Binding ExportCsvCommand}"/>
|
|
</StackPanel>
|
|
</DockPanel>
|
|
<Border Style="{StaticResource Divider}"/>
|
|
<DockPanel Style="{StaticResource Row}">
|
|
<StackPanel DockPanel.Dock="Left" MaxWidth="330">
|
|
<TextBlock Text="{Binding [SetCalendar]}"/>
|
|
<TextBlock Text="{Binding [SetCalendarHint]}" Style="{StaticResource RowHint}"/>
|
|
</StackPanel>
|
|
<Button DockPanel.Dock="Right" Content="{Binding [Export]}" Style="{StaticResource SubtleButton}" Command="{Binding ExportIcsCommand}"/>
|
|
</DockPanel>
|
|
</StackPanel>
|
|
</Border>
|
|
|
|
<!-- shortcuts -->
|
|
<TextBlock Text="{Binding [SetShortcuts]}" Style="{StaticResource GroupTitle}"/>
|
|
<Border Style="{StaticResource Group}" Padding="16,10">
|
|
<Grid TextElement.FontSize="12.5">
|
|
<Grid.ColumnDefinitions>
|
|
<ColumnDefinition Width="150"/>
|
|
<ColumnDefinition Width="*"/>
|
|
</Grid.ColumnDefinitions>
|
|
<Grid.RowDefinitions>
|
|
<RowDefinition/><RowDefinition/><RowDefinition/><RowDefinition/><RowDefinition/><RowDefinition/><RowDefinition/>
|
|
</Grid.RowDefinitions>
|
|
<StackPanel Grid.Row="0" Orientation="Horizontal" Margin="0,3"><Border Style="{StaticResource Key}"><TextBlock Text="Ctrl"/></Border><Border Style="{StaticResource Key}"><TextBlock Text="N"/></Border></StackPanel>
|
|
<TextBlock Grid.Row="0" Grid.Column="1" Text="{Binding [NewEntry]}" VerticalAlignment="Center"/>
|
|
<StackPanel Grid.Row="1" Orientation="Horizontal" Margin="0,3"><Border Style="{StaticResource Key}"><TextBlock Text="Ctrl"/></Border><Border Style="{StaticResource Key}"><TextBlock Text="F"/></Border></StackPanel>
|
|
<TextBlock Grid.Row="1" Grid.Column="1" Text="{Binding [ShortcutSearch]}" VerticalAlignment="Center"/>
|
|
<StackPanel Grid.Row="2" Orientation="Horizontal" Margin="0,3"><Border Style="{StaticResource Key}"><TextBlock Text="Enter"/></Border></StackPanel>
|
|
<TextBlock Grid.Row="2" Grid.Column="1" Text="{Binding [ShortcutEdit]}" VerticalAlignment="Center"/>
|
|
<StackPanel Grid.Row="3" Orientation="Horizontal" Margin="0,3"><Border Style="{StaticResource Key}"><TextBlock Text="Entf / Del"/></Border></StackPanel>
|
|
<TextBlock Grid.Row="3" Grid.Column="1" Text="{Binding [ShortcutDelete]}" VerticalAlignment="Center"/>
|
|
<StackPanel Grid.Row="4" Orientation="Horizontal" Margin="0,3"><Border Style="{StaticResource Key}"><TextBlock Text="Ctrl"/></Border><Border Style="{StaticResource Key}"><TextBlock Text="Z"/></Border></StackPanel>
|
|
<TextBlock Grid.Row="4" Grid.Column="1" Text="{Binding [Undo]}" VerticalAlignment="Center"/>
|
|
<StackPanel Grid.Row="5" Orientation="Horizontal" Margin="0,3"><Border Style="{StaticResource Key}"><TextBlock Text="Esc"/></Border></StackPanel>
|
|
<TextBlock Grid.Row="5" Grid.Column="1" Text="{Binding [ShortcutEsc]}" VerticalAlignment="Center"/>
|
|
<StackPanel Grid.Row="6" Orientation="Horizontal" Margin="0,3"><Border Style="{StaticResource Key}"><TextBlock Text="Ctrl"/></Border><Border Style="{StaticResource Key}"><TextBlock Text=","/></Border></StackPanel>
|
|
<TextBlock Grid.Row="6" Grid.Column="1" Text="{Binding [Settings]}" VerticalAlignment="Center"/>
|
|
</Grid>
|
|
</Border>
|
|
|
|
<!-- about -->
|
|
<TextBlock Text="{Binding [Info]}" Style="{StaticResource GroupTitle}"/>
|
|
<Border Style="{StaticResource Group}" Margin="0">
|
|
<DockPanel Margin="16,14">
|
|
<Image DockPanel.Dock="Left" Source="/Assets/app.png" Width="40" Height="40" Margin="0,0,14,0" RenderOptions.BitmapScalingMode="HighQuality"/>
|
|
<StackPanel VerticalAlignment="Center">
|
|
<TextBlock FontWeight="SemiBold">
|
|
<Run Text="{Binding [AppTitle], Mode=OneWay}"/>
|
|
<Run Text="{Binding VersionText, Mode=OneWay}" FontWeight="Normal" Foreground="{DynamicResource TextSecondaryBrush}"/>
|
|
</TextBlock>
|
|
<TextBlock FontSize="12" Margin="0,2,0,0" Foreground="{DynamicResource TextSecondaryBrush}">
|
|
<Run Text="{Binding CopyrightText, Mode=OneWay}"/>
|
|
<Run Text=" · "/>
|
|
<Hyperlink Command="{Binding OpenDiscordCommand}" Foreground="{DynamicResource PrimaryBrush}" TextDecorations="None">discord.gg/Ej4JPmCZva</Hyperlink>
|
|
</TextBlock>
|
|
</StackPanel>
|
|
</DockPanel>
|
|
</Border>
|
|
</StackPanel>
|
|
</ScrollViewer>
|
|
</Grid>
|
|
</Border>
|
|
</Window>
|