[Feature request] 按候选窗宽度自动决定每页候选数 / Fill candidate page by panel width instead of fixed page_size

Aperta
#1,203 0 commenti 0 reazioni 0 assegnatari Vedi su GitHub

Nessuno ha ancora preso questa issue.

Valutazione

Difficoltà
5/5
Tempo stimato
Più di una settimana
Idoneità per principianti
15/100
Tipo di issue
Funzionalità
Chiarezza
Abbastanza chiara
Stato di attività
Attiva
Stack tecnologico
macos, swift
Ambito
desktop-dev

Direzione di ricerca

Start from the style parsing layer (squirrel.yaml keys feeding the config object) and follow how style/memorize_size and candidate_list_layout reach the panel class that draws the linear candidate row. The per-page count itself is governed by librime's menu/page_size, so check whether the engine exposes candidate widths or whether the panel must measure rendered strings to decide the fit. Done means a new style option sets a maximum visible width, the panel packs as many candidates as fit, and typing short versus long candidates in a locally built Squirrel shows the count adapting.

Scritto dal modello di indicizzazione a partire dal testo della issue.

Descrizione

需求 / Request

目前每页候选数由 menu/page_size 固定。希望能增加一个选项,让横排候选窗保持固定(或最大)宽度,每页显示的候选数量根据候选词长度自动调整,尽量填满这一行。类似 macOS 自带简体拼音的行为:候选词短时一页显示更多,长时显示更少。

Currently the number of candidates per page is fixed by menu/page_size. I'd like an option for the horizontal (linear) panel to keep a fixed/maximum width and fit as many candidates as that width allows, like Apple's built-in Pinyin IME does: more candidates when they're short, fewer when they're long.

现状 / Current workaround

style/memorize_size: true 可以防止窗口宽度频繁变化,但每页数量仍然固定,短词时一行有很多空白,长词时窗口又很宽。

style/memorize_size: true keeps the panel from resizing constantly, but the count per page stays fixed, so short candidates leave empty space and long ones make the panel very wide.

可能的配置 / Possible config

style:
  candidate_list_layout: linear
  max_width: 600        # panel width in points
  page_size_mode: fit   # fill page by width; page_size acts as upper limit

环境 / Environment

  • macOS (MacBook Air)
  • Squirrel ,方案:雾凇拼音 (rime-ice)
Lingua principale
Swift
Stelle
6.6k
Fork
586
Merge medio
1g 19h
PR unite (30g)
1

Preparare l'ambiente

Questo progetto non fornisce container di sviluppo, Dockerfile né guida per i contributori, quindi l'ambiente è a tuo carico: parti dal suo README e consulta la nostra guida al primo contributo per i passaggi generali.

Come iniziare

  1. Leggi tutta la issue e poi la guida ai contributi del progetto.
  2. Commenta sulla issue per dire che te ne occupi tu — evita che due persone facciano lo stesso lavoro.
  3. Fai un fork del repository e lavora su un branch.
  4. Apri una pull request che faccia riferimento al numero della issue.

Altre issue di rime/squirrel

Tutte le issue di rime/squirrel

Issue simili

Altre issue su Swift

Ricevi le nuove issue nella tua casella

Un breve riepilogo di issue GitHub adatte ai principianti.