Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

候補リストの横対応 #282

Merged
merged 20 commits into from
Feb 9, 2025
Merged

Conversation

waynezhang
Copy link
Contributor

@waynezhang waynezhang commented Jan 11, 2025

#270 の実装。

変更した箇所

  • 設定を追加 (デフォルトでは縦のまま)
  • 縦の場合は注釈ビューの高さを固定 (候補リストをカーソルの上にするか下にするかの判断ロジックをシンプルにするのと、注釈ビューの位置を安定にするため)

結構きたない実装であとで整理します。(もし意見をいただいたらと思います)

Screenshot 2025-01-12 at 12 22 19

@waynezhang waynezhang force-pushed the horizontal-candidates branch 3 times, most recently from 1f164f6 to bf425ca Compare January 12, 2025 15:34
@mtgto
Copy link
Owner

mtgto commented Jan 19, 2025

コントリビュートありがとうございます。まだ見れてなくてごめんなさい。
今日 (2025-01-19) にv1.8.0をリリースしたあと、次のバージョンに入れるためにこのPull Requestを見ようと思います。

@waynezhang waynezhang force-pushed the horizontal-candidates branch from bf425ca to e60fb23 Compare January 19, 2025 12:15
@waynezhang
Copy link
Contributor Author

@mtgto ありがとうございます! 一応手元に使ってみたところ、問題なかったのですが、KeyBinding のところで Left, Right, Up, Down は key mapping を変えないと違和感がある (Up, Down はページめぐりなるとか) のでどうしようかと悩んでますw

@mtgto
Copy link
Owner

mtgto commented Jan 19, 2025

@waynezhang

KeyBinding のところで Left, Right, Up, Down は key mapping を変えないと違和感がある (Up, Down はページめぐりなるとか) のでどうしようかと悩んでますw

私がStateMachineのhandleSelectで横のときのキー操作を実装しようと思います。
候補リストが横のときには、次のような操作を考えています。基本AquaSKKと同じにします。

  • Left, Rightで1項目移動 (= 縦のときのUp, Downと同じ)
  • Up, downでページ移動する (= 縦のときのLeft, Rightと同じ)
  • 変換候補ウィンドウが開いているときはSpaceでページ移動する (= 縦のときと同じ)

@mtgto
Copy link
Owner

mtgto commented Feb 3, 2025

縦の場合は注釈ビューの高さを固定 (候補リストをカーソルの上にするか下にするかの判断ロジックをシンプルにするのと、注釈ビューの位置を安定にするため)

可変な注釈ビューの高さになるようにちゃんとやりたかったのですが、時間がかなりかかりそうなので後回しにしようと思います。

今考えている方法 (うまくいくかはわからない)

  • CandidatesPanel.show(windowLevel:) を呼ぶときにスクリーンサイズとcursorPositionからカーソルの右(縦表示)or下(横表示)に出すのか左or上に出すのかを決めてしまう
  • 上に出すならsetFrameOrigin、左or右or下に出すならsetFrameTopLeftPointしておき、CandidatesPanelの表示中は変えない

@mtgto mtgto changed the title [Draft] 候補リストの横対応 候補リストの横対応 Feb 9, 2025
@mtgto mtgto marked this pull request as ready for review February 9, 2025 07:54
@mtgto
Copy link
Owner

mtgto commented Feb 9, 2025

まだAnnotationViewの高さを可変にできてないのはあるんですが、だいぶお待たせしまっているのでこれでマージしようと思います。
コントリビュートありがとうございました。

@mtgto mtgto merged commit 4e9828a into mtgto:main Feb 9, 2025
1 check passed
@waynezhang
Copy link
Contributor Author

お! ありがとうございます! 中途半端の PR を出してすいません。。。

@waynezhang waynezhang deleted the horizontal-candidates branch February 9, 2025 08:52
@mtgto
Copy link
Owner

mtgto commented Feb 9, 2025

@waynezhang こちらこそ最初に実装を送っていただきありがとうございました。
もし送っていただかなかったらきっともっとずっと遅くなっていたと思います。

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants