style: match translation footer action ordering and keycaps

This commit is contained in:
2026-10-18 02:02:12 +02:00
parent dcc124e382
commit b13976c516
2 changed files with 10 additions and 8 deletions
+2
View File
@@ -134,6 +134,8 @@ Notes autosave locally as RTFD packages, including embedded images, under `~/Lib
Search for **Conjure Translate**, identified by its centered 🌏 icon, and open it. Choose a provider in the pill-shaped header selector, enter text in the search bar, then press Return or click **Translate**. Typing alone never sends text. When the translation is available, the action changes to **Copy**: press Return or click it to copy the full translation and close Conjure. Command-C still copies selected output. Editing the input restores **Translate**. Search for **Conjure Translate**, identified by its centered 🌏 icon, and open it. Choose a provider in the pill-shaped header selector, enter text in the search bar, then press Return or click **Translate**. Typing alone never sends text. When the translation is available, the action changes to **Copy**: press Return or click it to copy the full translation and close Conjure. Command-C still copies selected output. Editing the input restores **Translate**.
The footer places **Translate/Copy** and its Return keycap before **Actions**, whose Command and K keys use separate keycaps, matching the launcher.
Press Command-P or click the provider selector to expand a searchable action-style popup from its top edge downwards, hiding the indicator until the popup closes. A checkmark marks the current provider. Use Up/Down and Return or click a provider to select it; Escape, Back, or clicking outside closes the popup. Changing providers clears the previous result without submitting a request. Press Command-P or click the provider selector to expand a searchable action-style popup from its top edge downwards, hiding the indicator until the popup closes. A checkmark marks the current provider. Use Up/Down and Return or click a provider to select it; Escape, Back, or clicking outside closes the popup. Changing providers clears the previous result without submitting a request.
The footer shows the current language pair (initially **English → Japanese**). Click it or open **Actions** with Command-K to change the source language, change the target language, or swap them. Language choices are saved locally and apply to both providers. Changing languages clears the previous result without submitting another request. The input hint and output accessibility label follow the selected pair. Escape closes an open action/provider picker first and dismisses the window only when no picker is open. Back closes the picker first, then returns to the launcher and restores your search. Command-W always dismisses the entire window. The footer shows the current language pair (initially **English → Japanese**). Click it or open **Actions** with Command-K to change the source language, change the target language, or swap them. Language choices are saved locally and apply to both providers. Changing languages clears the previous result without submitting another request. The input hint and output accessibility label follow the selected pair. Escape closes an open action/provider picker first and dismisses the window only when no picker is open. Back closes the picker first, then returns to the launcher and restores your search. Command-W always dismisses the entire window.
+8 -8
View File
@@ -130,22 +130,22 @@ final class TranslationController: NSViewController {
let returnKey = ShortcutIndicator("↵") let returnKey = ShortcutIndicator("↵")
let actionPill = NSView() let actionPill = NSView()
stylePill(actionPill) stylePill(actionPill)
let actionsKey = ShortcutIndicator("⌘K") let actionsKey = ShortcutIndicator("⌘", "K")
for control in [actionsButton, actionsKey, translateButton, returnKey] { for control in [translateButton, returnKey, actionsButton, actionsKey] {
control.translatesAutoresizingMaskIntoConstraints = false control.translatesAutoresizingMaskIntoConstraints = false
actionPill.addSubview(control) actionPill.addSubview(control)
} }
NSLayoutConstraint.activate([ NSLayoutConstraint.activate([
actionPill.heightAnchor.constraint(equalToConstant: 36), actionPill.heightAnchor.constraint(equalToConstant: 36),
actionsButton.leadingAnchor.constraint(equalTo: actionPill.leadingAnchor, constant: 14), translateButton.leadingAnchor.constraint(equalTo: actionPill.leadingAnchor, constant: 14),
actionsButton.centerYAnchor.constraint(equalTo: actionPill.centerYAnchor),
actionsKey.leadingAnchor.constraint(equalTo: actionsButton.trailingAnchor, constant: 8),
actionsKey.centerYAnchor.constraint(equalTo: actionPill.centerYAnchor),
translateButton.leadingAnchor.constraint(equalTo: actionsKey.trailingAnchor, constant: 16),
translateButton.centerYAnchor.constraint(equalTo: actionPill.centerYAnchor), translateButton.centerYAnchor.constraint(equalTo: actionPill.centerYAnchor),
returnKey.leadingAnchor.constraint(equalTo: translateButton.trailingAnchor, constant: 8), returnKey.leadingAnchor.constraint(equalTo: translateButton.trailingAnchor, constant: 8),
returnKey.centerYAnchor.constraint(equalTo: actionPill.centerYAnchor), returnKey.centerYAnchor.constraint(equalTo: actionPill.centerYAnchor),
returnKey.trailingAnchor.constraint(equalTo: actionPill.trailingAnchor, constant: -12), actionsButton.leadingAnchor.constraint(equalTo: returnKey.trailingAnchor, constant: 14),
actionsButton.centerYAnchor.constraint(equalTo: actionPill.centerYAnchor),
actionsKey.leadingAnchor.constraint(equalTo: actionsButton.trailingAnchor, constant: 8),
actionsKey.centerYAnchor.constraint(equalTo: actionPill.centerYAnchor),
actionsKey.trailingAnchor.constraint(equalTo: actionPill.trailingAnchor, constant: -12),
]) ])
let footer = NSStackView(views: [languageButton, status, settingsButton, NSView(), actionPill]) let footer = NSStackView(views: [languageButton, status, settingsButton, NSView(), actionPill])
footer.orientation = .horizontal footer.orientation = .horizontal