95 Commits
Author SHA1 Message Date
Lu Fan(SonnyCalcr) cc868151a8 feat: 新增 canvas 基底,D2D 候选窗支持 v2 九宫格、挂件分层与 APNG/GIF 动图 (#1014)
* feat(ui): 新增 APNG/GIF 动图解码与动画帧时钟

AnimatedImage 按 APNG 规范解析 acTL/fcTL/fdAT 并校验序号、CRC 与帧边界,逐帧重建 PNG 交给 WIC 解码后按 dispose_op/blend_op 合成;GIF 走 WIC 多帧解码。延时规则与浏览器一致,超限或损坏的动画退回静态首帧。

DeviceResources::GetImageFrame 按动画时钟取帧并汇报下一次换帧时刻,动图帧按 64 MB 预算缓存;Scene 与 Window 据此按需重绘,可整体关闭动画。DrawNineSlice 按 CSS border-image 语义区分源切片与目标边宽、支持 fill,并用夹取画刷消除接缝渗色。

* feat(server): 新增 canvas 基础皮肤并要求 v2 皮肤基于它

canvas 是全贴图基底:透明面板、无描边、无圆角、无阴影,外观来自九宫格面板图与挂件。它只能作为外部皮肤的 base,不进内置皮肤列表;v1 皮肤用它直接报错。

schema_version = 2 而 base 不是 canvas 的皮肤按 v1 加载、忽略全部 v2 字段,并在扫描结果里记一条问题。v2 字段补齐校验:图片限 .png/.apng/.gif/.webp,fill 必须是布尔,偏移与 z_index 有范围,挂件最多 32 层。

* feat(server): D2D 候选窗补齐 v2 九宫格、挂件分层与动图

canvas 皮肤在 D2D 候选窗里按 CSS border-image 语义绘制九宫格面板:切片以源图像素计、边宽以 DIP 计、fill = false 不画中心;有面板图时卡片的底色、描边、圆角与阴影让给贴图。content_insets_dip 从面板外缘量起且不小于边框宽度,line_gap_dip 只作用于预编辑行与候选之间。

挂件拆成卡片前后两层:z_index < 1 在面板之下,其余在面板之上,同层按 z_index 与声明顺序稳定排序;图片在框内等比居中。动图按场景给出的下一次换帧时刻排一次性定时器续帧,只在候选窗显示时运行,隐藏、换皮肤时停;系统关闭动画效果时只显示首帧,v1 皮肤保持静态。

设置页原生预览认得 canvas 基底并绘制面板图。

* feat(examples): 新增基于 canvas 的 v2 全贴图皮肤样例

canvas-demo 用 2 倍九宫格面板、面板下层的叶子挂件和面板上层循环播放的 APNG 星光演示 v2 皮肤,素材均为程序生成的几何图形,随目录以 MIT 授权。样例测试同步校验 schema 2 与 canvas 互为前提、v2 图片扩展名与数值范围。

* docs(examples): 说明 canvas 基底、v2 九宫格与挂件分层及动图规则

schema 说明去掉「仅 WebView2」,写明 v2 必须以 canvas 为 base、canvas 只能当 base;九宫格切片按源图像素、边宽按 DIP,content_insets_dip 不小于边宽,line_gap_dip 只管预编辑行与候选之间;挂件以 z_index 1 为界分在面板上下两层;动图格式、帧时长、上限与系统减少动画时的行为。server/docs/ui-backends.md 与 skins/README.md 同步更新。

* docs(server): 候选窗与皮肤目录的注释不再引用已删除的 WebView2 页面
2026-10-17 02:57:33 +08:00
Evan 4fc16952b3 wip(windows): 补齐隐私与许可交付,修好外部人的构建入口
- 新增 PRIVACY.md:逐项写明每个联网端点、发送内容、默认开关与关闭方式,明确云候选默认开启、
  token 在 config.toml 明文存储、无任何遥测
- 设置页「用户协议」「隐私政策」两个无 handler 的死按钮接上;前者改名为「开源许可协议」指向
  LICENSE,开源产品的用户条款就是许可证本身,不再承诺一份不存在的 EULA
- 安装包随包装入 GPL 正文并在安装向导显示(GPLv3 §4/§6),补上打包测试断言
- release.yml 增加 build provenance attestation,并在发布后向 MSIME-Web 发 repository_dispatch,
  让 msime.app/update.json 不再等两小时一次的 cron
- 所有 CMakePresets 的 vcpkg 路径改用 $env{VCPKG_ROOT},server 的 Boost 回退不再指向个人目录
- ui/README.md 指向本机绝对路径的 markdown 死链改成相对链接
- 新增 check-developer-paths.sh 并接入 required 的 quality 检查,防止路径回潮
- docs/installation.md 不再写死版本号
2026-09-06 12:05:06 +09:00
Evan Hu 2a2785ab7f chore: add GPL-3.0 license
本仓库此前没有 LICENSE 文件,GitHub 上显示为无许可,外部贡献者无法确认使用和分发条件。补上与水杉输入法其余仓库相同的 GPL-3.0 文本(与 MSIME-Windows、MSIME-Engine 的 LICENSE 逐字节一致),并在 README 末尾加一节说明。
2026-09-05 14:07:12 +09:00
fanlusky 548330b8cf Make a demo of an on-screen keyboard. 2026-07-15 18:22:50 +08:00
fanlusky 05a4ada19d Optimize the emoji panel. 2026-07-15 15:34:53 +08:00
fanlusky 604cf987b1 emoji panel demo step01 2026-07-15 14:49:36 +08:00
fanlusky 4f62123699 Support image render 2026-07-15 14:39:55 +08:00
fanlusky 8c6fbcc7f2 docs 2026-06-23 11:23:21 +08:00
fanlusky a91baf56c1 Add dictionary-backed word deletion 2026-06-19 13:46:10 +08:00
fanlusky ab5516da96 Unclamp combo box popups 2026-06-19 13:03:32 +08:00
fanlusky e210c8eb4c Allow popups to scroll out of view 2026-06-19 13:00:35 +08:00
fanlusky 19257221cc Restore popup trigger press feedback 2026-06-19 12:54:41 +08:00
fanlusky 8a20c1461a Remove sticky button focus border 2026-06-19 12:50:00 +08:00
fanlusky 8330d7cf15 Narrow candidate header text slot 2026-06-19 12:06:52 +08:00
fanlusky b1a07ea3f2 Tighten candidate caret spacing 2026-06-19 12:04:06 +08:00
fanlusky 66b359e461 Fix candidate header caret visibility 2026-06-19 12:01:54 +08:00
fanlusky 946ebb1802 Add candidate header caret 2026-06-19 11:58:20 +08:00
fanlusky d2ca118d89 Add candidate hover highlight 2026-06-19 11:52:43 +08:00
fanlusky 7361a13b19 Keep arrow cursor over candidate list 2026-06-19 11:49:15 +08:00
fanlusky 7075c06aee Emphasize candidate highlight bar 2026-06-19 11:46:45 +08:00
fanlusky 6326e0f81d Remove candidate header bottom gap 2026-06-19 11:42:18 +08:00
fanlusky f015dbbb42 Set candidate header top gap to 2px 2026-06-19 11:40:15 +08:00
fanlusky 452b5c6aa0 Lower candidate header baseline 2026-06-19 11:37:10 +08:00
fanlusky 33350ab7c2 Trim candidate header text metrics 2026-06-19 11:34:30 +08:00
fanlusky d153fd0632 Tighten candidate header spacing 2026-06-19 11:29:24 +08:00
fanlusky fffcf648b2 Widen candidate highlight block 2026-06-19 11:24:32 +08:00
fanlusky abe110c6e1 Refine candidate preview weight 2026-06-19 11:14:22 +08:00
fanlusky 718d4f9559 Align candidate preview typography 2026-06-19 11:06:54 +08:00
fanlusky 9e7d1acdac Scale candidate preview back up 2026-06-19 10:59:29 +08:00
fanlusky eb6d49b7ea Compress candidate preview spacing 2026-06-19 08:12:20 +08:00
fanlusky 912cf30148 Align candidate bar to selection edge 2026-06-19 08:07:54 +08:00
fanlusky d35dd7b2de Tighten candidate preview toward reference 2026-06-19 08:00:25 +08:00
fanlusky 01612f3db3 Polish candidate preview shell 2026-06-19 07:52:08 +08:00
fanlusky a182e6a16f Tune candidate preview emphasis 2026-06-19 06:50:02 +08:00
fanlusky d102d0a72a Refine candidate selection geometry 2026-06-18 05:54:43 +08:00
fanlusky ddbfbabaec Match candidate preview to HTML styling 2026-06-17 20:36:17 +08:00
fanlusky 2953e2685a Fix compact candidate preview spacing 2026-06-17 20:31:59 +08:00
fanlusky 69fc8ca540 Tighten candidate preview layout 2026-06-17 20:28:02 +08:00
fanlusky 34ea7bf8cc Fix candidate preview text encoding 2026-06-17 20:23:29 +08:00
fanlusky 41f4571bd2 Add candidate popup keyboard navigation 2026-06-17 20:20:17 +08:00
fanlusky 10cfb70d66 Add candidate popup preview primitives 2026-06-17 19:08:27 +08:00
fanlusky e1156b32e2 Highlight scrollbar on hover 2026-06-17 16:44:51 +08:00
fanlusky cda3101b3c Remove multiline selection seam 2026-06-17 16:35:07 +08:00
fanlusky e70a8c5f11 Center demo window on startup 2026-06-17 16:17:18 +08:00
fanlusky 83d10fed4c Fix repeated Ctrl+Backspace deletion 2026-06-16 23:07:25 +08:00
fanlusky 8a95ecd9cd Smooth multiline selection and add Ctrl+Backspace 2026-06-16 22:56:23 +08:00
fanlusky 3666ff7e14 Add basic TextBox clipboard shortcuts 2026-06-16 22:46:03 +08:00
fanlusky 195ca6a47f Smooth TextBox selection highlight rendering 2026-06-16 22:39:51 +08:00
fanlusky a8e4993f4a Keep arrow cursor over ScrollViewer scrollbar 2026-06-16 22:34:15 +08:00
fanlusky e72c2c8b60 Prevent TextBox jitter during caret blink 2026-06-16 22:30:04 +08:00