diff --git a/App/Panel/PanelView.swift b/App/Panel/PanelView.swift index 7f17e20..43577bf 100644 --- a/App/Panel/PanelView.swift +++ b/App/Panel/PanelView.swift @@ -41,27 +41,32 @@ struct PanelView: View { private var header: some View { HStack(spacing: 10) { - ZStack { - Image(systemName: "line.3.horizontal") - .font(.caption2) - .foregroundStyle(.tertiary) - .allowsHitTesting(false) + ZStack(alignment: .leading) { WindowDragArea() + HStack(spacing: 10) { + Image(systemName: "line.3.horizontal") + .font(.system(size: 12, weight: .semibold)) + .foregroundStyle(.secondary) + .frame(width: 24, height: 32) + .background(.quaternary, in: RoundedRectangle(cornerRadius: 7)) + Image(systemName: "character.bubble") + .font(.title2) + .foregroundStyle(.tint) + VStack(alignment: .leading, spacing: 1) { + Text(String(localized: "Translate")) + .font(.headline) + Text("\(sourceLanguageLabel) → \(model.configuration.target.localizedDisplayName)") + .font(.caption) + .foregroundStyle(.secondary) + } + } + .allowsHitTesting(false) } - .frame(width: 18, height: 28) + .frame(height: 44) + .contentShape(Rectangle()) + .help(String(localized: "Drag to move panel")) .accessibilityLabel(String(localized: "Move panel")) - Image(systemName: "character.bubble") - .font(.title2) - .foregroundStyle(.tint) - .accessibilityHidden(true) - VStack(alignment: .leading, spacing: 1) { - Text(String(localized: "Translate")) - .font(.headline) - Text("\(sourceLanguageLabel) → \(model.configuration.target.localizedDisplayName)") - .font(.caption) - .foregroundStyle(.secondary) - } Spacer() Button { showLanguagePicker.toggle() diff --git a/App/Resources/de.lproj/Localizable.strings b/App/Resources/de.lproj/Localizable.strings index fdee77e..9353a39 100644 --- a/App/Resources/de.lproj/Localizable.strings +++ b/App/Resources/de.lproj/Localizable.strings @@ -11,6 +11,7 @@ "Quit Sprachmittler" = "Sprachmittler beenden"; "Translate" = "Übersetzen"; "Move panel" = "Panel verschieben"; +"Drag to move panel" = "Zum Verschieben ziehen"; "Translation text size" = "Schriftgröße der Übersetzung"; "Source" = "Quelle"; "Settings" = "Einstellungen"; diff --git a/App/Resources/en.lproj/Localizable.strings b/App/Resources/en.lproj/Localizable.strings index 122f7a9..38af025 100644 --- a/App/Resources/en.lproj/Localizable.strings +++ b/App/Resources/en.lproj/Localizable.strings @@ -11,6 +11,7 @@ "Quit Sprachmittler" = "Quit Sprachmittler"; "Translate" = "Translate"; "Move panel" = "Move panel"; +"Drag to move panel" = "Drag to move panel"; "Translation text size" = "Translation text size"; "Source" = "Source"; "Settings" = "Settings"; diff --git a/docs/ARCHITECTURE.md b/docs/ARCHITECTURE.md index f2a2753..4e25bc0 100644 --- a/docs/ARCHITECTURE.md +++ b/docs/ARCHITECTURE.md @@ -554,7 +554,7 @@ stateDiagram-v2 | Onboarding | `NSWindow` (not a SwiftUI `Window` scene) | Ollama reachable + version, Hy-MT3 installed, target language, optional Accessibility for Replace; each with a fix button | | Diagnostics | Window from the menu | Server version, model digests, last 50 timings and error kinds; copy as text; no text or translations | -Panel keyboard: **Esc** close, **⌘C** copy translation, **⌘↩** Replace, **⌘R** retry, **⌘,** Settings. The panel becomes key only when clicked; the source app keeps focus until then. The header has a drag grip; moving the panel keeps its position while it stays open, and a newly shown panel is placed near the cursor (DeepL-like transient position). The translation text size is a Settings value. +Panel keyboard: **Esc** close, **⌘C** copy translation, **⌘↩** Replace, **⌘R** retry, **⌘,** Settings. The panel becomes key only when clicked; the source app keeps focus until then. The left header block and its drag grip move the panel; moving it keeps its position while it stays open, and a newly shown panel is placed near the cursor (DeepL-like transient position). The translation text size is a Settings value. Accessibility: every control has an `accessibilityLabel`; the panel exposes source and translation as read-only text elements; full keyboard navigation; respects Reduce Motion and Increase Contrast. diff --git a/docs/PROGRESS.md b/docs/PROGRESS.md index 9f544ce..124c68d 100644 --- a/docs/PROGRESS.md +++ b/docs/PROGRESS.md @@ -150,4 +150,4 @@ Legend: `[ ]` open · `[~]` in progress · `[x]` done · `[!]` blocked (explain) 2026-11-26 · T8.5 · Added `scripts/release.sh` (archive unsigned, Developer ID sign, notarise/staple, DMG, `--dry-run`) and `make release`. 2026-11-26 · T8.6 · The compatibility matrix remains a manual 10-app pass; no untested cell is claimed. 2026-11-26 · T8.5 · Added a sibling-family app icon (`make icon`), `CFBundleIconName`/asset catalog wiring, `make install` from the Release build, and `make dmg`/`scripts/make-dmg.sh` with a mounted-image signature check. Dry-run release and local DMG/install were verified. -2026-11-26 · M4 polish · Added a header drag grip backed by an AppKit `performDrag` area; the panel keeps a moved position while visible and only recenters near the cursor when shown again. Added a persisted `translationFontSize` setting (default 17 pt, 12–28) with a Settings stepper and applied it to the translation text. +2026-11-26 · M4 polish · Enlarged the drag surface to the whole left header block, with a visible grip backed by an AppKit `performDrag` area; the panel keeps a moved position while visible and only recenters near the cursor when shown again. Added a persisted `translationFontSize` setting (default 17 pt, 12–28) with a Settings stepper and applied it to the translation text.