Skip to content

Add modern candidate window UI customization#881

Open
omni624562 wants to merge 2 commits into
EasyIME:masterfrom
omni624562:codex/pime-candidate-window-ui
Open

Add modern candidate window UI customization#881
omni624562 wants to merge 2 commits into
EasyIME:masterfrom
omni624562:codex/pime-candidate-window-ui

Conversation

@omni624562
Copy link
Copy Markdown

Summary / 摘要

中文

這個 PR 接上新版 libIME2 CandidateWindow 能力,讓 PIME 的候選窗可以由輸入法設定頁控制外觀與行為。

主要內容:

  • 新增候選窗新版 UI 設定傳遞流程,讓 Python backend 可透過 customizeUI 控制候選窗樣式
  • 支援候選窗 header/body 雙層結構,顯示輸入法名稱、組字字根與頁碼資訊
  • 大易、新酷音、酷倉、蝦米可將組字字根顯示於候選窗 header,而不是輸入中的欄位
  • 新增候選窗提示訊息,例如無候選字時可在候選窗 body 顯示提示
  • 新增可設定項目:
    • 新版候選窗 UI
    • 每列候選字數
    • 候選窗字體大小
    • 配色主題
    • 選字符樣式
    • 提示訊息樣式
    • 固定候選窗最小寬度
    • 候選窗最小/最大寬度
    • 超過最大寬度自動換行
    • 自動避開螢幕邊緣
    • 只有一個候選字時自動送出
  • 重整大易 / 酷倉 / 蝦米 / 新酷音設定頁,提供候選窗外觀的即時預覽與所見即所得設定
  • 修正新酷音候選窗行為,使候選清單可正常選字與送出
  • 修正大易候選窗頁碼顯示與選字符號一致性
  • 修正候選窗 UI 設定變更後第一次顯示未套用新樣式的問題

English

This PR wires PIME to the new libIME2 CandidateWindow capabilities, allowing candidate window appearance and behavior to be configured from IME settings pages.

Highlights:

  • Adds a customizeUI flow so Python backends can configure candidate window styling
  • Supports a stable header/body layout with IME name, composition roots, and page information
  • Moves composition roots for Dayi, New Chewing, New Cangjie, and Che Liu into the candidate window header instead of the active input field
  • Supports candidate-window messages, such as no-candidate hints in the window body
  • Adds configurable options for:
    • Modern candidate window UI
    • Candidates per row
    • Candidate window font size
    • Theme colors
    • Selection-key style
    • Message style
    • Stable minimum width
    • Minimum/maximum candidate window width
    • Max-width wrapping
    • Screen-edge avoidance
    • Auto-commit when there is only one candidate
  • Reworks Dayi / New Cangjie / Che Liu / New Chewing settings pages with live preview / WYSIWYG candidate-window configuration
  • Fixes New Chewing candidate selection and commit behavior with the modern candidate UI
  • Fixes Dayi page info and selection-key consistency
  • Fixes the first candidate window render not applying the configured modern style

Dependency / 相依 PR

中文

此 PR 依賴 libIME2 的新版 CandidateWindow PR,需先合併或一起測試:

  • EasyIME/libIME2: modern CandidateWindow rendering and theme support

English

This PR depends on the libIME2 modern CandidateWindow PR and should be merged/tested together with it:

  • EasyIME/libIME2: modern CandidateWindow rendering and theme support

Compatibility / 相容性

中文

新版候選窗 UI 由設定控制;未啟用新版 UI 時,既有 legacy 候選窗流程應維持相容。

English

The modern candidate window UI is controlled by configuration. When disabled, the existing legacy candidate window behavior should remain compatible.

Validation / 驗證

  • git diff --check
  • python -m py_compile python\cinbase\config.py python\cinbase\__init__.py python\cinbase\cin.py python\cinbase\configtool.py python\input_methods\chewing\chewing_config.py python\input_methods\chewing\chewing_ime.py python\input_methods\chewing\config_tool.py python\textService.py python\server.py
  • python -m unittest tests.test_backend_resilience
  • cmake --build build --config Release --target PIMETextService on Win32
  • cmake --build build64 --config Release --target PIMETextService on x64

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.

1 participant