Category editor redesign, English as default language

- Category editor: icon tile per category opens an icon + color picker
  (no clipped mini combo boxes), placeholders explained, live preview
- Header glyph removed; dialog follows the shared styles
- Dialogs opened from Settings are owned by the active window
  (category editor could open behind the settings window)
- Default language is English; German via Settings > Language

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This commit is contained in:
2026-11-29 18:20:04 +01:00
parent 3e0b00f11c
commit 7486eebd67
8 changed files with 203 additions and 121 deletions

View File

@@ -319,7 +319,7 @@ namespace ReminderOrganizer.ViewModels
{
var dialog = new CategoryWindow(_appData.Categories, IsDarkMode,
id => _allTasks.Count(t => t.IsAnniversary && (t.CategoryId ?? Category.BirthdayId) == id))
{ Owner = Application.Current.MainWindow };
{ Owner = ActiveOwner };
if (dialog.ShowDialog() != true) return;
var result = dialog.Result;
@@ -511,7 +511,7 @@ namespace ReminderOrganizer.ViewModels
ShowUpcomingCommand = new RelayCommand(() => ShowCategory(null));
ShowCategoryCommand = new RelayCommand<string>(ShowCategory);
OpenSettingsCommand = new RelayCommand(() =>
new SettingsWindow(this) { Owner = Application.Current.MainWindow }.ShowDialog());
new SettingsWindow(this) { Owner = ActiveOwner }.ShowDialog());
OpenDataFolderCommand = new RelayCommand(() =>
{
try { System.Diagnostics.Process.Start(new System.Diagnostics.ProcessStartInfo { FileName = DataFolder, UseShellExecute = true }); }
@@ -654,9 +654,13 @@ namespace ReminderOrganizer.ViewModels
// ---------- dialogs ----------
/// <summary>Dialogs belong to the window the user is looking at (e.g. Settings), not always the main window.</summary>
private static Window? ActiveOwner =>
Application.Current.Windows.OfType<Window>().FirstOrDefault(w => w.IsActive) ?? Application.Current.MainWindow;
private string? AskName(string title, string current)
{
var dialog = new InputDialog(title, L("NewName"), current, IsDarkMode) { Owner = Application.Current.MainWindow };
var dialog = new InputDialog(title, L("NewName"), current, IsDarkMode) { Owner = ActiveOwner };
if (dialog.ShowDialog() != true) return null;
var name = dialog.ResponseText?.Trim();
return string.IsNullOrEmpty(name) ? null : name;
@@ -748,7 +752,7 @@ namespace ReminderOrganizer.ViewModels
category = anniversaries.GroupBy(t => t.CategoryId ?? Category.BirthdayId).OrderByDescending(g => g.Count()).First().Key;
if (category == null && CategoryFilter is { } cf && cf != TaskQuery.AppointmentsFilter)
category = cf;
var taskWindow = new TaskWindow(null, IsDarkMode, Categories, category) { Owner = Application.Current.MainWindow };
var taskWindow = new TaskWindow(null, IsDarkMode, Categories, category) { Owner = ActiveOwner };
if (taskWindow.ShowDialog() == true)
{
folder.Tasks.Add(taskWindow.TaskResult);