style: dim translation explanations

This commit is contained in:
2026-10-18 11:43:03 +02:00
parent 340a0bbda6
commit 5e504d00f9
2 changed files with 11 additions and 1 deletions
+9 -1
View File
@@ -380,7 +380,15 @@ final class TranslationController: NSViewController {
? myMemoryTranslate(text, source, target)
: openAITranslate(text, source, target, key, context)
guard !Task.isCancelled, let self else { return }
self.output.string = translation
let rendered = NSMutableAttributedString(string: translation, attributes: [
.font: NSFont.systemFont(ofSize: 20),
.foregroundColor: SunsetPalette.text,
])
if !myMemory, let separator = translation.range(of: "\n\n") {
rendered.addAttribute(.foregroundColor, value: SunsetPalette.secondaryText,
range: NSRange(separator.upperBound..<translation.endIndex, in: translation))
}
self.output.textStorage?.setAttributedString(rendered)
self.setStatus("")
self.translateButton.title = "Copy"
self.translateButton.toolTip = "Copy the translation and close Conjure (Return)."