diff --git a/App.xaml b/App.xaml
index 58d8355..95fa682 100644
--- a/App.xaml
+++ b/App.xaml
@@ -1,18 +1,25 @@
-
-
-
-
-
-
-
-
-
-
-
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
diff --git a/App.xaml.cs b/App.xaml.cs
index ef0e78b..df21cb3 100644
--- a/App.xaml.cs
+++ b/App.xaml.cs
@@ -41,6 +41,13 @@ namespace ReminderOrganizer
private System.Threading.Mutex? _singleInstance;
+ /// Really exit (tray menu / "Exit"): the main window otherwise only hides to the tray.
+ public static void Quit()
+ {
+ (Current.MainWindow as MainWindow)?.AllowClose();
+ Current.Shutdown();
+ }
+
protected override void OnExit(ExitEventArgs e)
{
(MainWindow as MainWindow)?.OnAppExit();
diff --git a/Assets/app.ico b/Assets/app.ico
index f8be00d..750cd87 100644
Binary files a/Assets/app.ico and b/Assets/app.ico differ
diff --git a/Assets/app.png b/Assets/app.png
index 6365566..a5006d3 100644
Binary files a/Assets/app.png and b/Assets/app.png differ
diff --git a/CLAUDE.md b/CLAUDE.md
index b9e257c..1016fb8 100644
--- a/CLAUDE.md
+++ b/CLAUDE.md
@@ -12,9 +12,14 @@ services through `ServiceLocator` (Microsoft.Extensions.DependencyInjection).
- Anniversaries: `ReminderTask.IsAnniversary` (stored as JSON `"IsBirthday"` for older files) + `CategoryId`
→ `Models/Category.cs` (presets birthday/wedding/jubilee/memorial + own ones, text with `{0}`/`{o}`).
Filter/sort/group rules are in `Core/TaskQuery.cs` (pure, tested).
-- `Core/Theme.cs`: the only light/dark palette, used by MainWindow and the dialogs (`Theme.Apply(Resources, dark)`).
-- `MainWindow.xaml`: custom chrome (WindowStyle=None). Icons are Segoe MDL2 glyphs or Path geometry, **no emojis**
- (they don't follow the theme).
+- `Core/Theme.cs`: the only light/dark palette (neutral greys + one accent), applied to **Application.Resources**
+ (so context menus, tooltips and dialogs follow). Theme mode system/light/dark in settings.
+- `Themes/Controls.xaml`: all shared styles (menus, tooltips, scrollbars, combo box, date picker, check box,
+ buttons `PrimaryButton`/`SubtleButton`/`IconButton`, `Segment`, `ToggleSwitch`, `DoneCheck`). Change looks here, not per window.
+- `MainWindow.xaml`: `WindowChrome` (native resize/snap/shadow, DWM rounded corners), no menu bar: settings gear
+ → `SettingsWindow`. Row actions appear on hover. Icons are Segoe Fluent/MDL2 glyphs or Path geometry, **no emojis**.
+- Design rules: no glow, no scaling on hover, animations only 120–200 ms and only where they carry meaning
+ (dialog open, snackbar, group chevron, toggle knob, window fade-in).
- `Tests/`: xUnit project, excluded from the app csproj via `Compile Remove`.
## Rules
@@ -25,6 +30,9 @@ services through `ServiceLocator` (Microsoft.Extensions.DependencyInjection).
- Run `dotnet test Tests\ReminderOrganizer.Tests.csproj` before each release. `release.bat` does this automatically.
## Graphics
+App icon is drawn, not generated: `py -3.12 tools\make_icon.py ` (rounded square + Fluent bell), then
+save as `Assets\app.png` (256) and `Assets\app.ico` (16–256). Older ComfyUI notes below.
+
`sprite-generator\` = ComfyGen template (`_Tools\ComfyGen`). App icon: `gen generate icon` → `gen adopt --size 512 icon`
→ convert `Assets\Sprites\icon.png` to `Assets\app.ico` (Pillow, sizes 16–256). The csproj and MainWindow pick up
`Assets\app.ico` automatically (window, tray, exe). Without the file, the default icon is used.
diff --git a/CategoryWindow.xaml b/CategoryWindow.xaml
index 28f00bd..ca16a02 100644
--- a/CategoryWindow.xaml
+++ b/CategoryWindow.xaml
@@ -59,7 +59,7 @@
-
+
@@ -72,14 +72,13 @@
-
+
-
-
+
+
-
+
diff --git a/CategoryWindow.xaml.cs b/CategoryWindow.xaml.cs
index 13f0d64..d536f43 100644
--- a/CategoryWindow.xaml.cs
+++ b/CategoryWindow.xaml.cs
@@ -1,4 +1,4 @@
-#nullable enable
+#nullable enable
using System;
using System.Collections.Generic;
using System.Collections.ObjectModel;
@@ -29,6 +29,7 @@ namespace ReminderOrganizer
public CategoryWindow(IEnumerable categories, bool darkMode, Func usageCount)
{
InitializeComponent();
+ DialogAnimation.Attach(this);
Theme.Apply(Resources, darkMode);
_loc = (ILocalizationService)ServiceLocator.Services.GetService(typeof(ILocalizationService))!;
_usage = usageCount;
diff --git a/Converters/TaskConverters.cs b/Converters/TaskConverters.cs
index 100d4c1..395af98 100644
--- a/Converters/TaskConverters.cs
+++ b/Converters/TaskConverters.cs
@@ -18,6 +18,16 @@ namespace ReminderOrganizer.Converters
public object ConvertBack(object value, Type targetType, object parameter, CultureInfo culture) => Binding.DoNothing;
}
+ /// true if both values are the same object (row == selected task).
+ public class ReferenceEqualsConverter : IMultiValueConverter
+ {
+ public object Convert(object[] values, Type targetType, object parameter, CultureInfo culture) =>
+ values.Length == 2 && values[0] != null && ReferenceEquals(values[0], values[1]);
+
+ public object[] ConvertBack(object value, Type[] targetTypes, object parameter, CultureInfo culture) =>
+ throw new NotSupportedException();
+ }
+
/// Task → first day of its month (group key for month grouping).
public class MonthKeyConverter : IValueConverter
{
diff --git a/Core/DialogAnimation.cs b/Core/DialogAnimation.cs
new file mode 100644
index 0000000..92341d0
--- /dev/null
+++ b/Core/DialogAnimation.cs
@@ -0,0 +1,33 @@
+#nullable enable
+using System;
+using System.Windows;
+using System.Windows.Media;
+using System.Windows.Media.Animation;
+
+namespace ReminderOrganizer
+{
+ /// Subtle open animation for dialogs: fade in + 2 % scale, 140 ms, ease-out.
+ public static class DialogAnimation
+ {
+ public static void Attach(Window window)
+ {
+ window.Opacity = 0;
+ window.Loaded += (_, _) =>
+ {
+ var ease = new CubicEase { EasingMode = EasingMode.EaseOut };
+ var duration = TimeSpan.FromMilliseconds(140);
+ window.BeginAnimation(UIElement.OpacityProperty, new DoubleAnimation(0, 1, duration) { EasingFunction = ease });
+
+ if (window.Content is FrameworkElement root)
+ {
+ var scale = new ScaleTransform(0.98, 0.98);
+ root.RenderTransformOrigin = new Point(0.5, 0.5);
+ root.RenderTransform = scale;
+ var anim = new DoubleAnimation(0.98, 1, duration) { EasingFunction = ease };
+ scale.BeginAnimation(ScaleTransform.ScaleXProperty, anim);
+ scale.BeginAnimation(ScaleTransform.ScaleYProperty, anim);
+ }
+ };
+ }
+ }
+}
diff --git a/Core/Theme.cs b/Core/Theme.cs
index 03c6b82..98053b8 100644
--- a/Core/Theme.cs
+++ b/Core/Theme.cs
@@ -4,53 +4,80 @@ using System.Windows.Media;
namespace ReminderOrganizer.Core
{
- /// One place for the light/dark palette – used by the main window and all dialogs.
+ ///
+ /// One place for the light/dark palette. Neutral greys + a single muted accent (Fluent-like).
+ /// Applied to Application.Resources so context menus, tooltips and dialogs all follow the theme.
+ ///
public static class Theme
{
- private static SolidColorBrush B(uint rgb)
+ public static bool IsDark { get; private set; } = true;
+
+ private static SolidColorBrush B(uint rgb, byte alpha = 255)
{
- var b = new SolidColorBrush(Color.FromRgb((byte)(rgb >> 16), (byte)(rgb >> 8), (byte)rgb));
+ var b = new SolidColorBrush(Color.FromArgb(alpha, (byte)(rgb >> 16), (byte)(rgb >> 8), (byte)rgb));
b.Freeze();
return b;
}
public static void Apply(ResourceDictionary res, bool dark)
{
+ if (ReferenceEquals(res, Application.Current?.Resources)) IsDark = dark;
+
+ // shared
+ res["PrimaryBrush"] = B(0x5B5BD6);
+ res["PrimaryHoverBrush"] = B(0x4C4CC4);
+ res["DangerBrush"] = B(dark ? 0xF0706AU : 0xD93A34U);
+ res["WarningBrush"] = B(0xE5A00D);
+ res["SuccessBrush"] = B(dark ? 0x3DD68CU : 0x18A058U);
+ res["SecondaryBrush"] = res["SuccessBrush"];
+
if (dark)
{
- res["SidebarBrush"] = B(0x1A1A24);
- res["CardBrush"] = B(0x22222E);
- res["TextPrimaryBrush"] = B(0xF5F5F5);
- res["TextSecondaryBrush"] = B(0xA8A8BC);
- res["BorderBrush"] = B(0x3A3A4A);
- res["BackgroundBrush"] = B(0x121218);
- res["HoverBrush"] = B(0x2A2A3A);
- res["SidebarTextBrush"] = B(0xF5F5F5);
- res["SidebarSecondaryBrush"] = B(0x9999AA);
- res["MenuBackgroundBrush"] = B(0x22222E);
- res["PrimaryLightBrush"] = B(0x37345F);
- res["HeaderBrush"] = B(0x22222E);
- res["InputBackgroundBrush"] = B(0x2A2A38);
- res["BadgeBrush"] = B(0x37345F);
- res["BadgeTextBrush"] = B(0xC7C8FF);
+ res["BackgroundBrush"] = B(0x16161A);
+ res["SidebarBrush"] = B(0x1C1C21);
+ res["HeaderBrush"] = B(0x1C1C21);
+ res["CardBrush"] = B(0x202026);
+ res["MenuBackgroundBrush"] = B(0x26262D);
+ res["InputBackgroundBrush"] = B(0x1A1A1F);
+ res["BorderBrush"] = B(0x2E2E36);
+ res["DividerBrush"] = B(0x2A2A31);
+ res["HoverBrush"] = B(0x2A2A31);
+ res["SelectedBrush"] = B(0x2B2B45);
+ res["TextPrimaryBrush"] = B(0xEDEDF2);
+ res["TextSecondaryBrush"] = B(0x9C9CA8);
+ res["TextTertiaryBrush"] = B(0x6E6E7A);
+ res["SidebarTextBrush"] = B(0xDCDCE4);
+ res["SidebarSecondaryBrush"] = B(0x80808C);
+ res["AccentSubtleBrush"] = B(0x2D2D4C);
+ res["AccentTextBrush"] = B(0xB9BAFF);
+ res["PrimaryLightBrush"] = res["AccentSubtleBrush"];
+ res["BadgeBrush"] = B(0x2D2D4C);
+ res["BadgeTextBrush"] = B(0xB9BAFF);
+ res["SnackbarBrush"] = B(0x33333C);
}
else
{
- res["SidebarBrush"] = B(0xF8FAFC);
+ res["BackgroundBrush"] = B(0xF6F7F9);
+ res["SidebarBrush"] = B(0xEEF0F3);
+ res["HeaderBrush"] = B(0xEEF0F3);
res["CardBrush"] = B(0xFFFFFF);
- res["TextPrimaryBrush"] = B(0x1E293B);
- res["TextSecondaryBrush"] = B(0x64748B);
- res["BorderBrush"] = B(0xE2E8F0);
- res["BackgroundBrush"] = B(0xF1F5F9);
- res["HoverBrush"] = B(0xE2E8F0);
- res["SidebarTextBrush"] = B(0x1E293B);
- res["SidebarSecondaryBrush"] = B(0x64748B);
res["MenuBackgroundBrush"] = B(0xFFFFFF);
- res["PrimaryLightBrush"] = B(0xEEF2FF);
- res["HeaderBrush"] = B(0xFFFFFF);
- res["InputBackgroundBrush"] = B(0xF1F5F9);
- res["BadgeBrush"] = B(0xE0E7FF);
- res["BadgeTextBrush"] = B(0x4338CA);
+ res["InputBackgroundBrush"] = B(0xFFFFFF);
+ res["BorderBrush"] = B(0xDDE0E6);
+ res["DividerBrush"] = B(0xECEEF2);
+ res["HoverBrush"] = B(0xE6E8EE);
+ res["SelectedBrush"] = B(0xE9E9FB);
+ res["TextPrimaryBrush"] = B(0x1B1D23);
+ res["TextSecondaryBrush"] = B(0x646A78);
+ res["TextTertiaryBrush"] = B(0x9AA0AC);
+ res["SidebarTextBrush"] = B(0x2A2D35);
+ res["SidebarSecondaryBrush"] = B(0x7A7F8C);
+ res["AccentSubtleBrush"] = B(0xE4E4FA);
+ res["AccentTextBrush"] = B(0x3F3FB5);
+ res["PrimaryLightBrush"] = res["AccentSubtleBrush"];
+ res["BadgeBrush"] = B(0xE8E8FB);
+ res["BadgeTextBrush"] = B(0x4343B8);
+ res["SnackbarBrush"] = B(0x2B2D35);
}
}
}
diff --git a/InputDialog.xaml b/InputDialog.xaml
index 9971bf0..79f2bcb 100644
--- a/InputDialog.xaml
+++ b/InputDialog.xaml
@@ -1,4 +1,4 @@
-
-
+
@@ -30,12 +30,11 @@
-
+
-
-
-
+
+
+
diff --git a/InputDialog.xaml.cs b/InputDialog.xaml.cs
index c63572c..0231546 100644
--- a/InputDialog.xaml.cs
+++ b/InputDialog.xaml.cs
@@ -1,4 +1,4 @@
-#nullable enable
+#nullable enable
using System.Windows;
using System.Windows.Input;
using ReminderOrganizer.Core;
@@ -13,6 +13,7 @@ namespace ReminderOrganizer
public InputDialog(string title, string prompt, string defaultValue = "", bool? darkMode = null)
{
InitializeComponent();
+ DialogAnimation.Attach(this);
Title = title;
TxtTitle.Text = title;
TxtPrompt.Text = prompt;
diff --git a/Locales/de.json b/Locales/de.json
index 94516f9..24d39b3 100644
--- a/Locales/de.json
+++ b/Locales/de.json
@@ -3,7 +3,7 @@
"File": "Datei",
"Exit": "Beenden",
"Extras": "Extras",
- "Autostart": "Autostart",
+ "Autostart": "Mit Windows starten",
"Settings": "Einstellungen",
"Language": "Sprache",
"German": "Deutsch",
@@ -67,8 +67,8 @@
"DeleteTaskTooltip": "Task löschen",
"Info": "Info",
"Discord": "Discord-Community",
- "Import": "Import",
- "Export": "Export",
+ "Import": "Importieren",
+ "Export": "Exportieren",
"ImportCsv": "CSV Importieren",
"ExportCsv": "CSV Exportieren",
"ImportSuccess": "{0} Tasks erfolgreich importiert!",
@@ -169,5 +169,29 @@
"Wedding50": "Goldene Hochzeit",
"Wedding60": "Diamantene Hochzeit",
"Wedding65": "Eiserne Hochzeit",
- "Wedding70": "Gnadenhochzeit"
+ "Wedding70": "Gnadenhochzeit",
+ "NewEntry": "Neu",
+ "UpcomingBadgeTooltip": "Überfällig oder in den nächsten 7 Tagen",
+ "Restore": "Wiederherstellen",
+ "ThemeSystem": "System",
+ "SetAppearance": "Darstellung",
+ "SetTheme": "Farbschema",
+ "SetReminders": "Erinnerungen",
+ "PlaySoundHint": "Kurzer Ton, wenn eine Erinnerung erscheint.",
+ "AutostartHint": "Startet unsichtbar im Infobereich, damit keine Erinnerung verpasst wird.",
+ "TestNotificationHint": "Aussehen einer Erinnerung prüfen",
+ "CategoriesShort": "Arten von Jahrestagen mit eigenem Symbol, Farbe und Text.",
+ "EditCategoriesButton": "Bearbeiten…",
+ "SetData": "Daten",
+ "SetDataFolder": "Datenordner",
+ "OpenFolder": "Öffnen",
+ "SetCalendar": "Kalender (.ics)",
+ "SetCalendarHint": "Für Outlook, Google und Apple Kalender.",
+ "SetShortcuts": "Tastenkürzel",
+ "ShortcutSearch": "Suchen",
+ "ShortcutEdit": "Markierten Eintrag bearbeiten",
+ "ShortcutDelete": "Markierten Eintrag löschen",
+ "ShortcutEsc": "Suche / Auswahl aufheben",
+ "MovedToNext": "„{0}“ verschoben auf {1}",
+ "TestNow": "Test senden"
}
diff --git a/Locales/en.json b/Locales/en.json
index 69a23db..08f7a45 100644
--- a/Locales/en.json
+++ b/Locales/en.json
@@ -3,7 +3,7 @@
"File": "File",
"Exit": "Exit",
"Extras": "Extras",
- "Autostart": "Autostart",
+ "Autostart": "Start with Windows",
"Settings": "Settings",
"Language": "Language",
"German": "German",
@@ -65,7 +65,7 @@
"NextMonth": "Next Month",
"EditTaskTooltip": "Edit task",
"DeleteTaskTooltip": "Delete task",
- "Info": "Info",
+ "Info": "About",
"Discord": "Discord community",
"Import": "Import",
"Export": "Export",
@@ -169,5 +169,29 @@
"Wedding50": "Golden",
"Wedding60": "Diamond",
"Wedding65": "Blue sapphire",
- "Wedding70": "Platinum"
+ "Wedding70": "Platinum",
+ "NewEntry": "New",
+ "UpcomingBadgeTooltip": "Overdue or due within 7 days",
+ "Restore": "Restore",
+ "ThemeSystem": "System",
+ "SetAppearance": "Appearance",
+ "SetTheme": "Theme",
+ "SetReminders": "Reminders",
+ "PlaySoundHint": "A short chime when a reminder is shown.",
+ "AutostartHint": "Starts hidden in the notification area so no reminder is missed.",
+ "TestNotificationHint": "Check how a reminder looks",
+ "CategoriesShort": "Kinds of yearly anniversaries with their own icon, color and text.",
+ "EditCategoriesButton": "Edit…",
+ "SetData": "Data",
+ "SetDataFolder": "Data folder",
+ "OpenFolder": "Open",
+ "SetCalendar": "Calendar (.ics)",
+ "SetCalendarHint": "For Outlook, Google and Apple Calendar.",
+ "SetShortcuts": "Keyboard shortcuts",
+ "ShortcutSearch": "Search",
+ "ShortcutEdit": "Edit selected entry",
+ "ShortcutDelete": "Delete selected entry",
+ "ShortcutEsc": "Clear search / selection",
+ "MovedToNext": "\"{0}\" moved to {1}",
+ "TestNow": "Send test"
}
diff --git a/MainWindow.xaml b/MainWindow.xaml
index 66b010f..bf0a78e 100644
--- a/MainWindow.xaml
+++ b/MainWindow.xaml
@@ -2,53 +2,62 @@
xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
xmlns:models="clr-namespace:ReminderOrganizer.Models"
- Title="Reminder Organizer"
- Height="700" Width="1100"
+ Title="Reminder Organizer"
+ Width="1180" Height="760" MinWidth="980" MinHeight="600"
WindowStartupLocation="CenterScreen"
- MinHeight="550" MinWidth="900"
- WindowStyle="None"
- AllowsTransparency="True"
- Background="Transparent"
+ WindowStyle="SingleBorderWindow" ResizeMode="CanResize"
+ Background="{DynamicResource BackgroundBrush}"
+ FontFamily="{StaticResource UiFont}" FontSize="13"
+ Foreground="{DynamicResource TextPrimaryBrush}"
+ UseLayoutRounding="True" TextOptions.TextFormattingMode="Ideal"
+ Opacity="0"
PreviewKeyDown="Window_PreviewKeyDown">
+
+
+
+
+
+
-
- 0:0:0.15
- 0:0:0.3
- 0:0:0.5
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
+
+
+
-
- M1.5,3.5 L6,3.5 L7.5,5 L14.5,5 L14.5,13.5 L1.5,13.5 Z
+
-
-
-
+
-
-
-
-
+
+
+
+
+
+
+
+
+
+
+
+
-
+
-
-
-
+
+
-
-
-
-
-
-
-
-
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
-
-
-
-
-
-
+
+
+
+
+
+
+
@@ -135,1185 +202,567 @@
-
-
-
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
-
+
-
+
-
+
-
-
+
-
-
-
-
-
-
-
-
+
+
+
+
+
+
+
-
-
+
-
-
-
-
-
+ ToolTip="{Binding DataContext[DoneTooltip], RelativeSource={RelativeSource AncestorType=Window}}"/>
+
+
+
+
+
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
+
-
-
-
-
-
-
-
-
+
+
+
+
+
+
+
+
+
-
-
-
-
-
-
-
-
-
+
+
-
-
-
-
-
-
-
+
+
+
+
+
-
-
-
-
-
+
+
+
+
+
+
+ Discord
+
+
-
-
-
-
-
+
+
-
-
-
-
-
-
-
-
-
- Discord
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
+
+
+
+
+
+
+
-
-
-
-
-
-
+
+
+
+
+
-
-
-
-
-
-
-
-
-
-
-
-
-
-
+
+
+
+
+
-
-
-
-
-
-
-
-
-
-
-
-
+
+
+
+
+
+
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
+
+
+
+
+
+
+
-
-
-
-
-
-
-
-
-
-
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
-
-
-
-
-
-
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
diff --git a/MainWindow.xaml.cs b/MainWindow.xaml.cs
index 3482981..99d8cbc 100644
--- a/MainWindow.xaml.cs
+++ b/MainWindow.xaml.cs
@@ -1,6 +1,7 @@
-#nullable enable
+#nullable enable
using System;
using System.ComponentModel;
+using System.Runtime.InteropServices;
using System.Windows;
using System.Windows.Controls;
using System.Windows.Input;
@@ -31,11 +32,13 @@ namespace ReminderOrganizer
?? throw new InvalidOperationException("MainViewModel not found");
DataContext = _viewModel;
- _viewModel.ThemeChanged += (_, dark) => ApplyTheme(dark, animate: true);
+ _viewModel.ThemeChanged += (_, dark) => Theme.Apply(Application.Current.Resources, dark);
_viewModel.EditTaskRequested += OnEditTaskRequested;
_viewModel.PropertyChanged += OnViewModelPropertyChanged;
+ Microsoft.Win32.SystemEvents.UserPreferenceChanged += OnUserPreferenceChanged;
TrySetWindowIcon();
+ SourceInitialized += (_, _) => UseRoundedCorners();
Loaded += async (_, _) => await InitializeOnceAsync();
StateChanged += MainWindow_StateChanged;
}
@@ -53,17 +56,71 @@ namespace ReminderOrganizer
_initialized = true;
SetupTrayIcon();
await _viewModel.InitializeAsync();
- ApplyTheme(_viewModel.IsDarkMode, animate: false);
+ Theme.Apply(Application.Current.Resources, _viewModel.IsDarkMode);
+ RestoreWindowPlacement();
SyncTreeSelection();
+
+ // The window starts invisible so the user never sees the default theme flash.
+ BeginAnimation(OpacityProperty, new DoubleAnimation(0, 1, TimeSpan.FromMilliseconds(160)));
}
public void OnAppExit()
{
if (!_initialized) return;
+ RememberWindowPlacement();
+ Microsoft.Win32.SystemEvents.UserPreferenceChanged -= OnUserPreferenceChanged;
_viewModel.Cleanup();
_viewModel.FlushSave();
}
+ private void OnUserPreferenceChanged(object? sender, Microsoft.Win32.UserPreferenceChangedEventArgs e)
+ {
+ if (e.Category == Microsoft.Win32.UserPreferenceCategory.General)
+ Dispatcher.BeginInvoke(_viewModel.OnSystemThemeChanged);
+ }
+
+ // ---------- window placement ----------
+
+ private void RestoreWindowPlacement()
+ {
+ if (_viewModel.SavedWindowBounds is Rect r)
+ {
+ // only if the saved rectangle is still (mostly) on a screen
+ var screen = new Rect(SystemParameters.VirtualScreenLeft, SystemParameters.VirtualScreenTop,
+ SystemParameters.VirtualScreenWidth, SystemParameters.VirtualScreenHeight);
+ if (screen.IntersectsWith(new Rect(r.Left + 40, r.Top, Math.Max(1, r.Width - 80), 40)))
+ {
+ WindowStartupLocation = WindowStartupLocation.Manual;
+ Left = r.Left;
+ Top = r.Top;
+ Width = Math.Max(MinWidth, r.Width);
+ Height = Math.Max(MinHeight, r.Height);
+ }
+ }
+ if (_viewModel.SavedWindowMaximized) WindowState = WindowState.Maximized;
+ }
+
+ private void RememberWindowPlacement()
+ {
+ var bounds = WindowState == WindowState.Normal ? new Rect(Left, Top, Width, Height) : RestoreBounds;
+ if (bounds.Width > 0 && bounds.Height > 0)
+ _viewModel.RememberWindow(bounds, WindowState == WindowState.Maximized);
+ }
+
+ // Windows 11: native rounded corners for our custom-chrome window.
+ [DllImport("dwmapi.dll")]
+ private static extern int DwmSetWindowAttribute(IntPtr hwnd, int attr, ref int value, int size);
+
+ private void UseRoundedCorners()
+ {
+ try
+ {
+ int round = 2; // DWMWCP_ROUND
+ DwmSetWindowAttribute(new WindowInteropHelper(this).Handle, 33, ref round, sizeof(int));
+ }
+ catch { /* older Windows */ }
+ }
+
private void TrySetWindowIcon()
{
try
@@ -72,7 +129,7 @@ namespace ReminderOrganizer
}
catch
{
- // no Assets\app.ico yet – Windows default icon
+ // no Assets\app.ico – Windows default icon
}
}
@@ -103,14 +160,10 @@ namespace ReminderOrganizer
}, System.Windows.Threading.DispatcherPriority.Loaded);
}
- private void UpcomingEntry_Click(object sender, MouseButtonEventArgs e)
- {
- _viewModel.ShowUpcomingCommand.Execute(null);
- }
-
private void Window_PreviewKeyDown(object sender, KeyEventArgs e)
{
bool ctrl = (Keyboard.Modifiers & ModifierKeys.Control) != 0;
+ bool typing = Keyboard.FocusedElement is TextBox;
if (ctrl && e.Key == Key.N)
{
if (_viewModel.AddTaskCommand.CanExecute(null)) _viewModel.AddTaskCommand.Execute(null);
@@ -122,23 +175,38 @@ namespace ReminderOrganizer
SearchBox.SelectAll();
e.Handled = true;
}
+ else if (ctrl && e.Key == Key.OemComma)
+ {
+ _viewModel.OpenSettingsCommand.Execute(null);
+ e.Handled = true;
+ }
else if (e.Key == Key.Escape && (SearchBox.IsKeyboardFocusWithin || _viewModel.SearchText.Length > 0))
{
_viewModel.ClearSearchCommand.Execute(null);
FolderTree.Focus();
e.Handled = true;
}
- else if (ctrl && e.Key == Key.Z && _viewModel.IsUndoVisible)
+ else if (e.Key == Key.Escape && _viewModel.SelectedTask != null)
+ {
+ _viewModel.SelectedTask = null;
+ e.Handled = true;
+ }
+ else if (ctrl && e.Key == Key.Z && _viewModel.IsUndoVisible && !typing)
{
_viewModel.UndoCommand.Execute(null);
e.Handled = true;
}
- else if (e.Key == Key.Delete && !SearchBox.IsKeyboardFocusWithin && _viewModel.SelectedTask != null)
+ else if (e.Key == Key.Delete && !typing && _viewModel.SelectedTask != null)
{
_viewModel.DeleteTaskCommand.Execute(_viewModel.SelectedTask);
_viewModel.SelectedTask = null;
e.Handled = true;
}
+ else if (e.Key == Key.Enter && !typing && _viewModel.SelectedTask != null)
+ {
+ _viewModel.EditTaskCommand.Execute(_viewModel.SelectedTask);
+ e.Handled = true;
+ }
}
private void OnEditTaskRequested(object? sender, ReminderTask? task)
@@ -152,29 +220,19 @@ namespace ReminderOrganizer
}
}
- private void ApplyTheme(bool isDarkMode, bool animate)
- {
- Theme.Apply(Resources, isDarkMode);
- if (!animate || ThemeTransitionOverlay == null) return;
-
- var overlay = ThemeTransitionOverlay;
- overlay.Background = new SolidColorBrush(isDarkMode ? Color.FromRgb(0x12, 0x12, 0x18) : Color.FromRgb(0xF1, 0xF5, 0xF9));
- var fadeIn = new DoubleAnimation(0, 0.3, TimeSpan.FromMilliseconds(100));
- var fadeOut = new DoubleAnimation(0.3, 0, TimeSpan.FromMilliseconds(200));
- fadeIn.Completed += (s, args) => overlay.BeginAnimation(OpacityProperty, fadeOut);
- overlay.BeginAnimation(OpacityProperty, fadeIn);
- }
+ // ---------- caption ----------
private void MainWindow_StateChanged(object? sender, EventArgs e)
{
- if (WindowState == WindowState.Minimized)
- {
- HideToTray();
- }
+ // With WindowChrome a maximized window reaches past the screen edge by the resize border.
+ RootGrid.Margin = WindowState == WindowState.Maximized ? new Thickness(7) : new Thickness(0);
+ MaximizeButton.Content = WindowState == WindowState.Maximized ? "\uE923" : "\uE922";
+ MaximizeButton.ToolTip = _viewModel.L(WindowState == WindowState.Maximized ? "Restore" : "Maximize");
}
private void HideToTray()
{
+ RememberWindowPlacement();
Hide();
if (!_trayHintShown && _notifyIcon != null)
{
@@ -183,50 +241,30 @@ namespace ReminderOrganizer
}
}
- private void TitleBar_MouseLeftButtonDown(object sender, MouseButtonEventArgs e)
- {
- if (e.ClickCount == 2)
- {
- MaximizeRestore();
- }
- else if (e.LeftButton == MouseButtonState.Pressed)
- {
- DragMove();
- }
- }
-
- private void MinimizeButton_Click(object sender, RoutedEventArgs e)
- {
- WindowState = WindowState.Minimized;
- }
+ private void MinimizeButton_Click(object sender, RoutedEventArgs e) => SystemCommands.MinimizeWindow(this);
private void MaximizeButton_Click(object sender, RoutedEventArgs e)
{
- MaximizeRestore();
+ if (WindowState == WindowState.Maximized) SystemCommands.RestoreWindow(this);
+ else SystemCommands.MaximizeWindow(this);
}
- private void MaximizeRestore()
+ /// The window's X keeps the app running in the tray (reminders need it); "Exit" is in the tray menu.
+ private void CloseButton_Click(object sender, RoutedEventArgs e) => HideToTray();
+
+ protected override void OnClosing(CancelEventArgs e)
{
- if (WindowState == WindowState.Maximized)
+ // Alt+F4 / taskbar "close window": same as the X button unless the app is shutting down.
+ if (!_shuttingDown)
{
- WindowState = WindowState.Normal;
- MaximizeButton.Content = "";
- }
- else
- {
- // WindowStyle=None would cover the taskbar – limit to the work area.
- MaxHeight = SystemParameters.WorkArea.Height + 8;
- MaxWidth = SystemParameters.WorkArea.Width + 8;
- WindowState = WindowState.Maximized;
- MaximizeButton.Content = "";
+ e.Cancel = true;
+ HideToTray();
}
+ base.OnClosing(e);
}
- private void CloseButton_Click(object sender, RoutedEventArgs e)
- {
- HideToTray();
- }
-
+ private bool _shuttingDown;
+ public void AllowClose() => _shuttingDown = true;
private void SetupTrayIcon()
{
System.Drawing.Icon icon = System.Drawing.SystemIcons.Information;
@@ -250,8 +288,7 @@ namespace ReminderOrganizer
menu.Items.Add(_viewModel.L("Open"), null, (s, e) => ShowMainWindow());
menu.Items.Add(_viewModel.L("Exit"), null, (s, e) =>
{
- _viewModel.Cleanup();
- Application.Current.Shutdown();
+ App.Quit();
});
_notifyIcon.ContextMenuStrip = menu;
_notifyIcon.DoubleClick += (s, e) => ShowMainWindow();
@@ -327,42 +364,6 @@ namespace ReminderOrganizer
}
}
- private void TaskItem_MouseEnter(object sender, MouseEventArgs e)
- {
- if (sender is Border border)
- {
- if (border.RenderTransform is ScaleTransform scaleTransform)
- {
- scaleTransform.BeginAnimation(ScaleTransform.ScaleXProperty, new DoubleAnimation(1, 1.01, TimeSpan.FromMilliseconds(150)));
- scaleTransform.BeginAnimation(ScaleTransform.ScaleYProperty, new DoubleAnimation(1, 1.01, TimeSpan.FromMilliseconds(150)));
- }
- if (border.Effect is System.Windows.Media.Effects.DropShadowEffect effect)
- {
- effect.BeginAnimation(System.Windows.Media.Effects.DropShadowEffect.BlurRadiusProperty, new DoubleAnimation(15, TimeSpan.FromMilliseconds(200)));
- effect.BeginAnimation(System.Windows.Media.Effects.DropShadowEffect.OpacityProperty, new DoubleAnimation(0.35, TimeSpan.FromMilliseconds(200)));
- }
- border.SetResourceReference(Border.BackgroundProperty, "HoverBrush");
- }
- }
-
- private void TaskItem_MouseLeave(object sender, MouseEventArgs e)
- {
- if (sender is Border border)
- {
- if (border.RenderTransform is ScaleTransform scaleTransform)
- {
- scaleTransform.BeginAnimation(ScaleTransform.ScaleXProperty, new DoubleAnimation(1, TimeSpan.FromMilliseconds(150)));
- scaleTransform.BeginAnimation(ScaleTransform.ScaleYProperty, new DoubleAnimation(1, TimeSpan.FromMilliseconds(150)));
- }
- if (border.Effect is System.Windows.Media.Effects.DropShadowEffect effect)
- {
- effect.BeginAnimation(System.Windows.Media.Effects.DropShadowEffect.BlurRadiusProperty, new DoubleAnimation(0, TimeSpan.FromMilliseconds(150)));
- effect.BeginAnimation(System.Windows.Media.Effects.DropShadowEffect.OpacityProperty, new DoubleAnimation(0, TimeSpan.FromMilliseconds(150)));
- }
- border.Background = Brushes.Transparent;
- }
- }
-
private void TaskItem_MouseMove(object sender, MouseEventArgs e)
{
if (e.LeftButton != MouseButtonState.Pressed || sender is not FrameworkElement element || element.DataContext is not ReminderTask task)
@@ -376,17 +377,6 @@ namespace ReminderOrganizer
DragDrop.DoDragDrop(element, task, DragDropEffects.Move);
}
- // kept for styles that still reference them
- private void SecondaryButton_MouseEnter(object sender, MouseEventArgs e)
- {
- if (sender is Border border) border.SetResourceReference(Border.BackgroundProperty, "HoverBrush");
- }
-
- private void SecondaryButton_MouseLeave(object sender, MouseEventArgs e)
- {
- if (sender is Border border) border.Background = Brushes.Transparent;
- }
-
private void TreeView_DragOver(object sender, DragEventArgs e)
{
e.Effects = e.Data.GetDataPresent(typeof(ReminderTask)) ? DragDropEffects.Move : DragDropEffects.None;
@@ -436,4 +426,4 @@ namespace ReminderOrganizer
e.Handled = true;
}
}
-}
+}
\ No newline at end of file
diff --git a/Models/ReminderModels.cs b/Models/ReminderModels.cs
index 0365607..140822e 100644
--- a/Models/ReminderModels.cs
+++ b/Models/ReminderModels.cs
@@ -138,6 +138,11 @@ namespace ReminderOrganizer.Models
/// Set once by the app: culture for month names, relative-date formatter.
public static Func? DisplayCulture { get; set; }
public static Func? RelativeFormatter { get; set; }
+ public static Func? RecurrenceFormatter { get; set; }
+
+ /// "Weekly" etc. for recurring appointments (empty for one-off tasks and anniversaries).
+ [System.Text.Json.Serialization.JsonIgnore]
+ public string RecurrenceText => IsRecurring && !IsAnniversary ? RecurrenceFormatter?.Invoke(RecurrenceType) ?? RecurrenceType.ToString() : "";
/// "19. März" for birthdays, otherwise "19.03.2027 09:00".
[System.Text.Json.Serialization.JsonIgnore]
@@ -329,6 +334,16 @@ namespace ReminderOrganizer.Models
public bool? IsDarkMode { get; set; }
public bool PlaySound { get; set; } = true;
public bool HideDone { get; set; }
+ /// "system", "light", "dark" (empty = from IsDarkMode of older files).
+ public string ThemeMode { get; set; } = "";
+
+ /// Last window position/size (device-independent pixels).
+ public double? WindowLeft { get; set; }
+ public double? WindowTop { get; set; }
+ public double? WindowWidth { get; set; }
+ public double? WindowHeight { get; set; }
+ public bool WindowMaximized { get; set; }
+
/// "list", "compact" or "cards".
public string ViewMode { get; set; } = "list";
/// Group the list by month (collapsible).
diff --git a/SettingsWindow.xaml b/SettingsWindow.xaml
new file mode 100644
index 0000000..5f2e9b6
--- /dev/null
+++ b/SettingsWindow.xaml
@@ -0,0 +1,236 @@
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ discord.gg/Ej4JPmCZva
+
+
+
+
+
+
+
+
+
diff --git a/SettingsWindow.xaml.cs b/SettingsWindow.xaml.cs
new file mode 100644
index 0000000..9feb890
--- /dev/null
+++ b/SettingsWindow.xaml.cs
@@ -0,0 +1,31 @@
+#nullable enable
+using System.Windows;
+using System.Windows.Controls;
+using System.Windows.Input;
+using ReminderOrganizer.ViewModels;
+
+namespace ReminderOrganizer
+{
+ /// All settings in one place (replaces the old File/View menu). Changes apply immediately.
+ public partial class SettingsWindow : Window
+ {
+ public SettingsWindow(MainViewModel viewModel)
+ {
+ InitializeComponent();
+ DataContext = viewModel;
+ DialogAnimation.Attach(this);
+ }
+
+ private void Close_Click(object sender, RoutedEventArgs e) => Close();
+
+ private void Window_KeyDown(object sender, KeyEventArgs e)
+ {
+ if (e.Key == Key.Escape) Close();
+ }
+
+ private void Window_MouseLeftButtonDown(object sender, MouseButtonEventArgs e)
+ {
+ if (e.LeftButton == MouseButtonState.Pressed && e.OriginalSource is not TextBox) DragMove();
+ }
+ }
+}
diff --git a/TaskWindow.xaml b/TaskWindow.xaml
index 6ffa2d9..c90de9b 100644
--- a/TaskWindow.xaml
+++ b/TaskWindow.xaml
@@ -20,26 +20,7 @@
-
+
-
+
@@ -121,21 +102,19 @@
-
+
-
-
+
-
+
-
+
diff --git a/TaskWindow.xaml.cs b/TaskWindow.xaml.cs
index 9bc2659..081ca2c 100644
--- a/TaskWindow.xaml.cs
+++ b/TaskWindow.xaml.cs
@@ -1,4 +1,4 @@
-#nullable enable
+#nullable enable
using System.Windows;
using System.Windows.Input;
using ReminderOrganizer.Core;
@@ -19,6 +19,7 @@ namespace ReminderOrganizer
System.Collections.Generic.IEnumerable categories, string? defaultCategory = null)
{
InitializeComponent();
+ DialogAnimation.Attach(this);
Theme.Apply(Resources, darkMode);
var localizationService = (ILocalizationService)ServiceLocator.Services.GetService(typeof(ILocalizationService))!;
diff --git a/Themes/Controls.xaml b/Themes/Controls.xaml
new file mode 100644
index 0000000..8c583fb
--- /dev/null
+++ b/Themes/Controls.xaml
@@ -0,0 +1,690 @@
+
+
+
+ Segoe UI Variable Text, Segoe UI
+ Segoe Fluent Icons, Segoe MDL2 Assets
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ M1.5,3.5 L6,3.5 L7.5,5 L14.5,5 L14.5,13.5 L1.5,13.5 Z
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
diff --git a/ViewModels/MainViewModel.cs b/ViewModels/MainViewModel.cs
index 6aa2d5c..fc54940 100644
--- a/ViewModels/MainViewModel.cs
+++ b/ViewModels/MainViewModel.cs
@@ -167,9 +167,77 @@ namespace ReminderOrganizer.ViewModels
// ---------- settings ----------
- public bool IsGerman => _localizationService.CurrentLanguage == "de";
- public bool IsEnglish => _localizationService.CurrentLanguage == "en";
- public bool IsAutostartEnabled => _autostartService.IsAutostartEnabled;
+ public bool IsGerman
+ {
+ get => _localizationService.CurrentLanguage == "de";
+ set { if (value) _localizationService.SetLanguage("de"); }
+ }
+ public bool IsEnglish
+ {
+ get => _localizationService.CurrentLanguage == "en";
+ set { if (value) _localizationService.SetLanguage("en"); }
+ }
+
+ public bool IsAutostartEnabled
+ {
+ get => _autostartService.IsAutostartEnabled;
+ set { if (value != _autostartService.IsAutostartEnabled) ToggleAutostart(); }
+ }
+
+ // ---------- theme: system / light / dark ----------
+
+ /// "system", "light" or "dark".
+ public string ThemeMode
+ {
+ get => string.IsNullOrEmpty(_appData.ThemeMode) ? "system" : _appData.ThemeMode;
+ set
+ {
+ if (ThemeMode == value) return;
+ _appData.ThemeMode = value;
+ OnPropertyChanged();
+ OnPropertyChanged(nameof(IsThemeSystem));
+ OnPropertyChanged(nameof(IsThemeLight));
+ OnPropertyChanged(nameof(IsThemeDark));
+ ApplyThemeMode();
+ }
+ }
+ public bool IsThemeSystem { get => ThemeMode == "system"; set { if (value) ThemeMode = "system"; } }
+ public bool IsThemeLight { get => ThemeMode == "light"; set { if (value) ThemeMode = "light"; } }
+ public bool IsThemeDark { get => ThemeMode == "dark"; set { if (value) ThemeMode = "dark"; } }
+
+ private void ApplyThemeMode()
+ {
+ IsDarkMode = ThemeMode switch
+ {
+ "light" => false,
+ "dark" => true,
+ _ => SystemPrefs.IsDarkMode()
+ };
+ }
+
+ /// Windows switched light/dark: follow it when the app is set to "system".
+ public void OnSystemThemeChanged()
+ {
+ if (ThemeMode == "system") ApplyThemeMode();
+ }
+
+ public string DataFolder => DataService.DefaultDataDirectory;
+
+ // ---------- window placement ----------
+
+ public Rect? SavedWindowBounds =>
+ _appData.WindowWidth is double w && _appData.WindowHeight is double h && _appData.WindowLeft is double l && _appData.WindowTop is double t
+ ? new Rect(l, t, w, h) : null;
+ public bool SavedWindowMaximized => _appData.WindowMaximized;
+
+ public void RememberWindow(Rect bounds, bool maximized)
+ {
+ _appData.WindowLeft = bounds.Left;
+ _appData.WindowTop = bounds.Top;
+ _appData.WindowWidth = bounds.Width;
+ _appData.WindowHeight = bounds.Height;
+ _appData.WindowMaximized = maximized;
+ }
public bool PlaySound
{
@@ -384,6 +452,8 @@ namespace ReminderOrganizer.ViewModels
public ICommand ClearSearchCommand { get; }
public ICommand EditCategoriesCommand { get; }
public ICommand ShowCategoryCommand { get; }
+ public ICommand OpenSettingsCommand { get; }
+ public ICommand OpenDataFolderCommand { get; }
public MainViewModel(
IDataService dataService,
@@ -402,6 +472,7 @@ namespace ReminderOrganizer.ViewModels
_appData.Categories.FirstOrDefault(c => c.Id == id) ?? _appData.Categories.FirstOrDefault();
ReminderTask.DisplayCulture = () => new System.Globalization.CultureInfo(_localizationService.CurrentLanguage == "de" ? "de-DE" : "en-US");
ReminderTask.RelativeFormatter = RelativeText;
+ ReminderTask.RecurrenceFormatter = type => L(type.ToString());
// Empty name = refresh every binding (all texts depend on the language).
_localizationService.StringsChanged += (s, e) =>
@@ -418,7 +489,7 @@ namespace ReminderOrganizer.ViewModels
AddTaskToFolderCommand = new RelayCommand(AddTaskToFolder);
DeleteTaskCommand = new RelayCommand(DeleteTask);
EditTaskCommand = new RelayCommand(EditTask);
- ToggleDoneCommand = new RelayCommand(t => { _ = SaveAsync(); });
+ ToggleDoneCommand = new RelayCommand(ToggleDone);
DeleteFolderCommand = new RelayCommand(DeleteFolder, () => SelectedFolder != null);
RenameFolderCommand = new RelayCommand(RenameFolder, () => SelectedFolder != null);
MoveFolderUpCommand = new RelayCommand(() => MoveFolderBy(-1), () => SelectedFolder != null && Folders.IndexOf(SelectedFolder) > 0);
@@ -430,7 +501,7 @@ namespace ReminderOrganizer.ViewModels
SetLanguageEnCommand = new RelayCommand(() => _localizationService.SetLanguage("en"));
ToggleDarkModeCommand = new RelayCommand(() => IsDarkMode = !IsDarkMode);
TogglePlaySoundCommand = new RelayCommand(() => PlaySound = !PlaySound);
- ExitCommand = new RelayCommand(() => Application.Current.Shutdown());
+ ExitCommand = new RelayCommand(App.Quit);
MoveTaskToFolderCommand = new RelayCommand<(ReminderTask, Folder)>(MoveTaskToFolder);
TestNotificationCommand = new RelayCommand(TestNotification);
ImportCsvCommand = new RelayCommand(ImportCsv);
@@ -439,6 +510,13 @@ namespace ReminderOrganizer.ViewModels
OpenDiscordCommand = new RelayCommand(OpenDiscord);
ShowUpcomingCommand = new RelayCommand(() => ShowCategory(null));
ShowCategoryCommand = new RelayCommand(ShowCategory);
+ OpenSettingsCommand = new RelayCommand(() =>
+ new SettingsWindow(this) { Owner = Application.Current.MainWindow }.ShowDialog());
+ OpenDataFolderCommand = new RelayCommand(() =>
+ {
+ try { System.Diagnostics.Process.Start(new System.Diagnostics.ProcessStartInfo { FileName = DataFolder, UseShellExecute = true }); }
+ catch (Exception ex) { System.Diagnostics.Debug.WriteLine($"[OpenDataFolder] {ex.Message}"); }
+ });
UndoCommand = new RelayCommand(Undo);
ClearSearchCommand = new RelayCommand(() => { SearchText = ""; FilterMode = TaskFilterMode.All; CategoryFilter = null; });
EditCategoriesCommand = new RelayCommand(EditCategories);
@@ -465,7 +543,11 @@ namespace ReminderOrganizer.ViewModels
bool changed = _appData.EnsureDefaultCategories(L);
changed |= _appData.MigrateBirthdays() > 0;
if (changed) await SaveAsync();
- _isDarkMode = _appData.IsDarkMode.Value;
+ // Older files only knew IsDarkMode: keep their explicit choice; new installs follow Windows.
+ if (string.IsNullOrEmpty(_appData.ThemeMode))
+ _appData.ThemeMode = firstRun ? "system" : (_appData.IsDarkMode.Value ? "dark" : "light");
+ _isDarkMode = ThemeMode switch { "light" => false, "dark" => true, _ => SystemPrefs.IsDarkMode() };
+ _appData.IsDarkMode = _isDarkMode;
_appData.Folders.CollectionChanged += (s, e) => { HookFolders(); ReindexTasks(); };
HookFolders();
ReindexTasks();
@@ -703,6 +785,30 @@ namespace ReminderOrganizer.ViewModels
_ = SaveAsync();
}
+ ///
+ /// The check box already flipped IsNotified. One-off tasks are simply done/undone.
+ /// Recurring tasks (and anniversaries) are never "done for ever": checking moves them to the next date.
+ ///
+ private void ToggleDone(ReminderTask? task)
+ {
+ if (task == null) return;
+ if (task.IsRecurring && task.IsNotified)
+ {
+ var oldDate = task.ReminderDate;
+ var oldPre = task.IsPreNotified;
+ var from = oldDate > DateTime.Now ? oldDate : DateTime.Now;
+ task.IsNotified = false;
+ task.ReminderDate = task.GetNextOccurrence(from);
+ task.IsPreNotified = false;
+ OfferUndo(string.Format(L("MovedToNext"), task.Name, task.DisplayDate), () =>
+ {
+ task.ReminderDate = oldDate;
+ task.IsPreNotified = oldPre;
+ });
+ }
+ _ = SaveAsync();
+ }
+
private void EditTask(ReminderTask? task)
{
if (task == null) return;
diff --git a/docs/screenshots/main-window-dark.png b/docs/screenshots/main-window-dark.png
index 71d5d0e..e2ad9ad 100644
Binary files a/docs/screenshots/main-window-dark.png and b/docs/screenshots/main-window-dark.png differ
diff --git a/docs/screenshots/main-window.png b/docs/screenshots/main-window.png
index 5e426e1..40ab875 100644
Binary files a/docs/screenshots/main-window.png and b/docs/screenshots/main-window.png differ
diff --git a/docs/screenshots/settings.png b/docs/screenshots/settings.png
new file mode 100644
index 0000000..c168c02
Binary files /dev/null and b/docs/screenshots/settings.png differ
diff --git a/docs/screenshots/task-dialog.png b/docs/screenshots/task-dialog.png
index 4758c8a..410bc32 100644
Binary files a/docs/screenshots/task-dialog.png and b/docs/screenshots/task-dialog.png differ
diff --git a/tools/make_icon.py b/tools/make_icon.py
new file mode 100644
index 0000000..911beb2
--- /dev/null
+++ b/tools/make_icon.py
@@ -0,0 +1,29 @@
+import sys
+from PIL import Image, ImageDraw, ImageFont
+out = sys.argv[1]
+S = 1024
+# background: rounded square, calm vertical gradient (no gloss)
+grad = Image.new("RGBA", (S, S))
+top, bot = (112, 112, 236), (78, 78, 206)
+gd = ImageDraw.Draw(grad)
+for y in range(S):
+ t = y / (S - 1)
+ gd.line([(0, y), (S, y)], fill=tuple(int(top[i] + (bot[i] - top[i]) * t) for i in range(3)) + (255,))
+mask = Image.new("L", (S, S), 0)
+m = 56
+ImageDraw.Draw(mask).rounded_rectangle([m, m, S - m, S - m], radius=int(S * 0.21), fill=255)
+img = Image.new("RGBA", (S, S), (0, 0, 0, 0))
+img.paste(grad, (0, 0), mask)
+
+# solid bell: render outline glyph, flood-fill the outside, everything else = bell
+font = ImageFont.truetype(r"C:\Windows\Fonts\SegoeIcons.ttf", 520)
+g = Image.new("L", (S, S), 0)
+gdraw = ImageDraw.Draw(g)
+bbox = gdraw.textbbox((0, 0), "\uEA8F", font=font)
+w, h = bbox[2] - bbox[0], bbox[3] - bbox[1]
+gdraw.text(((S - w) / 2 - bbox[0], (S - h) / 2 - bbox[1] + 6), "\uEA8F", font=font, fill=255)
+ImageDraw.floodfill(g, (2, 2), 128)
+solid = g.point(lambda v: 0 if v == 128 else 255)
+img.paste(Image.new("RGBA", (S, S), (255, 255, 255, 255)), (0, 0), solid)
+img.save(out)
+