Repository navigation
HUD をマウスカーソルのそばに出せるようにする - #62
Merged
Merged
Conversation
大きな画面の端でコピーすると、画面上部に出る HUD が視界に入らない (#58)。cursor を選ぶと、コピーを検知した瞬間のマウスカーソルの右下に HUD を出す。右端・下端で入りきらなければ左・上へ回り込み、カーソルが ある画面の可視領域に収める。テキスト・画像・ファイルとも同じ規則で置く。 選択範囲のそばに出す案は、アクセシビリティ API で選択範囲の位置を取る 形で試したが、Zed は属性を持たず(-25205)、VS Code と Claude (Electron)は値を返さなかった(-25212)。よく使うアプリで効かず、 アクセシビリティの許可も要るので見送り、許可の要らないマウスカーソルの 位置にした。 カーソルがどの画面にも乗っていないときは top と同じ位置に出す。 動作確認: cargo test、visual_regression.sh、cargo fmt --check、 cargo clippy、build_app_bundle.sh が通る。端での回り込みと、メイン ディスプレイの左にある画面への配置は UT で確かめた。実機では local_check.sh --position cursor で、カーソルのそばに出ることを見た。 実機での回り込みと外部ディスプレイは未確認。 Closes #58
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
背景
HUD は画面の上部・中央・下部のいずれかに出るため、大きな画面の端でコピーすると視界に入らない。コピーした場所の近くに出す選択肢を設定に足す。
変更内容
[display] hud_positionにcursorを足す。HUD を出す時点のマウスカーソルの右下に HUD を置く。設定ウィンドウのポップアップ・--help・local_check.sh --position・README・docs/development.mdも合わせる仕様の注意点
AXSelectedTextRange→AXBoundsForRange)で選択範囲の位置を取る形を実機で試したが、Zed は属性を持たず(-25205)、VS Code と Claude(Electron)は値を返さなかった(-25212)NSEvent mouseLocation)なら許可は要らないtopと同じ位置に出す確認
cargo test(168 件)./scripts/visual_regression.sh(全ケース ok)cargo fmt --check/cargo clippy --all-targets -- -D warnings./scripts/build_app_bundle.shlocal_check.sh --position cursorでコピーすると、カーソルのそばに HUD が出る関連リンク