Tighten candidate caret spacing

This commit is contained in:
fanlusky committed 2026-06-19 12:04:06 +08:00
1 parent 66b359e461
commit b1a07ea3f2
2 files changed
+2 -1

No files matched your search

+1
View File
@@ -110,6 +110,7 @@
- 候选列表现支持鼠标悬浮高亮:悬浮到不同候选项时会显示轻量 hover 背景,但不会覆盖当前首项的既有选中高亮和蓝色指示条
- 候选窗顶部拼音右侧已补上一根静态 caret 竖线,便于继续向真实输入法候选窗的标题区形态靠拢
- 修正候选窗顶部 `ni` 标题行的宽度占用,让右侧 caret 不再被文本布局挤出弹窗可视区域
- 候选窗顶部 `ni` 与 caret 的水平间距已收紧到约 `1px`,更贴近参考图中的输入光标位置
- `CandidateList` 现支持基础键盘导航:弹层打开后会自动把焦点落到首个可聚焦内容上,候选列表可用 `Up/Down`、`Left/Right`、`Home/End`、`PageUp/PageDown` 切换高亮项
- demo 中的候选窗预览继续补上了底部分页/状态提示区,用来预演候选页码、当前高亮项和键盘操作提示的布局结构
- `Window` 新增公开的 `FocusVisual` 入口,方便 popup、候选窗、上下文菜单这类 overlay 内容在弹出后主动把焦点切到内部可交互控件
+1 -1
View File
@@ -462,7 +462,7 @@ std::unique_ptr<Scene> CreateDemoScene()
auto candidatePopupStack = std::make_shared<StackPanel>(0.0f);
candidatePopupStack->SetHorizontalContentAlignment(HorizontalAlignment::Leading);
auto candidateHeader = std::make_shared<HorizontalStackPanel>(2.0f);
auto candidateHeader = std::make_shared<HorizontalStackPanel>(1.0f);
candidateHeader->SetVerticalContentAlignment(VerticalAlignment::Center);
candidateHeader->SetMargin({12.0f, 0.0f, 0.0f, 0.0f});
candidateHeader->SetWidth(26.0f);