fix(panel): keep source available after it is collapsed
Render the source disclosure whenever the source-preview setting is enabled, instead of hiding it when its expanded state is false. The collapsed label becomes 'Show source' with a matching tooltip and localized English/German strings, so the source can be reopened. Verified: make verify green.
This commit is contained in:
1 parent
f466e6dd1c
commit
f8064ac430
4 files changed
+8
-2
No files matched your search
@@ -14,7 +14,7 @@ struct PanelView: View {
|
||||
var body: some View {
|
||||
VStack(alignment: .leading, spacing: 10) {
|
||||
header
|
||||
if showSource, let source = model.source {
|
||||
if model.configuration.showSourcePreview, let source = model.source {
|
||||
sourcePreview(source)
|
||||
}
|
||||
translationArea
|
||||
@@ -112,10 +112,11 @@ struct PanelView: View {
|
||||
}
|
||||
.frame(maxHeight: 100)
|
||||
} label: {
|
||||
Text(String(localized: "Source"))
|
||||
Text(showSource ? String(localized: "Source") : String(localized: "Show source"))
|
||||
.font(.caption.weight(.semibold))
|
||||
.foregroundStyle(.secondary)
|
||||
}
|
||||
.help(showSource ? String(localized: "Hide source") : String(localized: "Show source"))
|
||||
.accessibilityLabel(String(localized: "Source text"))
|
||||
}
|
||||
|
||||
|
||||
@@ -14,6 +14,8 @@
|
||||
"Drag to move panel" = "Zum Verschieben ziehen";
|
||||
"Translation text size" = "Schriftgröße der Übersetzung";
|
||||
"Source" = "Quelle";
|
||||
"Show source" = "Quelle anzeigen";
|
||||
"Hide source" = "Quelle ausblenden";
|
||||
"Settings" = "Einstellungen";
|
||||
"Search languages" = "Sprachen suchen";
|
||||
"Copy" = "Kopieren";
|
||||
|
||||
@@ -14,6 +14,8 @@
|
||||
"Drag to move panel" = "Drag to move panel";
|
||||
"Translation text size" = "Translation text size";
|
||||
"Source" = "Source";
|
||||
"Show source" = "Show source";
|
||||
"Hide source" = "Hide source";
|
||||
"Settings" = "Settings";
|
||||
"Search languages" = "Search languages";
|
||||
"Copy" = "Copy";
|
||||
|
||||
@@ -151,3 +151,4 @@ Legend: `[ ]` open · `[~]` in progress · `[x]` done · `[!]` blocked (explain)
|
||||
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 · 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.
|
||||
2026-11-26 · Panel · The source section now stays available as a collapsed “Show source” disclosure row after the user collapses it, instead of disappearing.
|
||||
Reference in new issue
Block a user