Set candidate header top gap to 2px
This commit is contained in:
1 parent
452b5c6aa0
commit
f015dbbb42
2 files changed
+3
-2
No files matched your search
@@ -103,6 +103,7 @@
|
||||
- 继续收紧候选窗顶部标题区:压缩 `ni` 上方留白,并把拼音与首个候选项之间的距离调整到更接近参考图
|
||||
- `TextBlock` 新增可调的文本布局内边距,候选窗顶部拼音标题已切换到紧凑测量模式,去掉了默认文本行高带来的额外顶部空白
|
||||
- 候选窗 demo 中的顶部拼音 `ni` 再向下微调 `3px`,方便继续贴近参考图的标题基线位置
|
||||
- 候选窗顶部留白现改为由 `Popup` 的 `2px` 上内边距统一控制,避免 `ni` 自身 margin 继续把顶部空白撑大
|
||||
- `CandidateList` 现支持基础键盘导航:弹层打开后会自动把焦点落到首个可聚焦内容上,候选列表可用 `Up/Down`、`Left/Right`、`Home/End`、`PageUp/PageDown` 切换高亮项
|
||||
- demo 中的候选窗预览继续补上了底部分页/状态提示区,用来预演候选页码、当前高亮项和键盘操作提示的布局结构
|
||||
- `Window` 新增公开的 `FocusVisual` 入口,方便 popup、候选窗、上下文菜单这类 overlay 内容在弹出后主动把焦点切到内部可交互控件
|
||||
|
||||
@@ -465,7 +465,7 @@ std::unique_ptr<Scene> CreateDemoScene()
|
||||
auto candidatePinyin = std::make_shared<TextBlock>(L"ni", 15.2f, D2D1::ColorF(0xFFFFFF), false);
|
||||
candidatePinyin->SetFontFamily(L"Noto Sans SC");
|
||||
candidatePinyin->SetTextLayoutPadding({0.0f, 0.0f, 0.0f, 0.0f});
|
||||
candidatePinyin->SetMargin({12.0f, 3.0f, 0.0f, 2.0f});
|
||||
candidatePinyin->SetMargin({12.0f, 0.0f, 0.0f, 2.0f});
|
||||
candidatePopupStack->AddChild(candidatePinyin);
|
||||
|
||||
auto candidateList = std::make_shared<CandidateList>(25.0f);
|
||||
@@ -493,7 +493,7 @@ std::unique_ptr<Scene> CreateDemoScene()
|
||||
auto candidatePopup = std::make_shared<Popup>(candidatePopupStack);
|
||||
candidatePopup->SetMatchAnchorWidth(false);
|
||||
candidatePopup->SetWidth(118.0f);
|
||||
candidatePopup->SetPadding({5.0f, 0.0f, 5.0f, 2.0f});
|
||||
candidatePopup->SetPadding({5.0f, 2.0f, 5.0f, 2.0f});
|
||||
candidatePopup->SetBackgroundFill(D2D1::ColorF(0x252525));
|
||||
candidatePopup->SetBorderColor(D2D1::ColorF(0x3A3A3A));
|
||||
candidatePopup->SetCornerRadius(7.0f);
|
||||
|
||||
Reference in new issue
Block a user