UI 文档:移除 HTML 制作流程改四阶段管线,RemoDispBus 文档移入 UI 设计目录

This commit is contained in:
2026-09-13 17:05:51 +08:00
parent eec6fa67b3
commit d3f56e6430
9 changed files with 173 additions and 371 deletions
-91
View File
@@ -1,91 +0,0 @@
<!DOCTYPE html>
<!--
界面 01:主界面(根页)样机 — 160×160
状态:制作中
规则:160×160 设备像素 | 1bpp 纯黑白 | SimSun 12px(汉字 12px/字,ASCII 6px/字,行高 13)
本文件仅渲染页面本身;规格见 01_主界面_说明.md
布局依据:原图 01_主界面原始图片.png 实测(628×631 @ 3.925x 缩放)
-->
<html lang="zh-CN">
<head>
<meta charset="UTF-8">
<title>界面 01 | 主界面</title>
<style>
html, body { margin:0; }
body { padding:24px; background:#e8e8e8;
display:flex; gap:24px; align-items:flex-start; flex-wrap:wrap; }
/* ===== 屏体:1 设备像素 = var(--u) ===== */
.ui { --u:1px; position:relative;
width:calc(160*var(--u)); height:calc(160*var(--u));
background:#000; color:#fff; overflow:hidden;
font-family:SimSun,NSimSun,serif; }
.ui.z4 { --u:4px; }
/* 顶部装饰:开口浅 V(底边 y=17 x16~145;两腿外上翘至 y=7 x7/x158),线宽 2px
(注:MCU 实现中两腿加粗为 3px 以补偿 1bpp 斜线阈值损耗,见 ui_menu.c MENU_DECO_LEG_W) */
.deco { position:absolute; left:0; top:0;
width:calc(160*var(--u)); height:calc(160*var(--u)); display:block; }
/* 状态行:左对齐 x=17,y=20 */
.status { position:absolute; left:calc(17*var(--u)); top:calc(20*var(--u));
font-size:calc(12*var(--u)); line-height:calc(13*var(--u)); white-space:nowrap; }
/* 列表框:左对齐 x=0,宽 99,7 行 × 15px + 1px 边框 = 高 107 */
.list { position:absolute; left:0; top:calc(44*var(--u));
width:calc(99*var(--u)); height:calc(107*var(--u));
box-sizing:border-box; border:calc(1*var(--u)) solid #fff; }
/* 行:高 15;文字左对齐(左留白 8);箭头紧跟文字(x=58) */
.row { position:absolute; left:0; width:100%; height:calc(15*var(--u));
font-size:calc(12*var(--u)); line-height:calc(15*var(--u)); }
.row .lb { position:absolute; left:calc(8*var(--u)); top:0; }
.row .ar { position:absolute; left:calc(58*var(--u)); top:0; }
.row.sel { background:#fff; color:#000; }
.r1 { top:calc(0*var(--u)); }
.r2 { top:calc(15*var(--u)); }
.r3 { top:calc(30*var(--u)); }
.r4 { top:calc(45*var(--u)); }
.r5 { top:calc(60*var(--u)); }
.r6 { top:calc(75*var(--u)); }
.r7 { top:calc(90*var(--u)); }
</style>
</head>
<body>
<!-- ① 1:1 实际大小(160×160,所见即真机) -->
<div class="ui">
<svg class="deco" viewBox="0 0 160 160">
<path d="M 7 7 L 16 17 L 145 17 L 158 7" fill="none" stroke="#fff" stroke-width="2"/>
</svg>
<div class="status">当前模式 : 无模式</div>
<div class="list">
<div class="row r1 sel"><span class="lb">装置信息</span></div>
<div class="row r2"><span class="lb">实时数据</span><span class="ar">▶</span></div>
<div class="row r3"><span class="lb">参数定值</span><span class="ar">▶</span></div>
<div class="row r4"><span class="lb">三遥设置</span><span class="ar">▶</span></div>
<div class="row r5"><span class="lb">装置维护</span><span class="ar">▶</span></div>
<div class="row r6"><span class="lb">通讯参数</span><span class="ar">▶</span></div>
<div class="row r7"><span class="lb">记录查询</span><span class="ar">▶</span></div>
</div>
</div>
<!-- ② 4x 放大(1 设备像素 = 4 屏幕像素,布局与 1:1 完全等价) -->
<div class="ui z4">
<svg class="deco" viewBox="0 0 160 160">
<path d="M 7 7 L 16 17 L 145 17 L 158 7" fill="none" stroke="#fff" stroke-width="2"/>
</svg>
<div class="status">当前模式 : 无模式</div>
<div class="list">
<div class="row r1 sel"><span class="lb">装置信息</span></div>
<div class="row r2"><span class="lb">实时数据</span><span class="ar">▶</span></div>
<div class="row r3"><span class="lb">参数定值</span><span class="ar">▶</span></div>
<div class="row r4"><span class="lb">三遥设置</span><span class="ar">▶</span></div>
<div class="row r5"><span class="lb">装置维护</span><span class="ar">▶</span></div>
<div class="row r6"><span class="lb">通讯参数</span><span class="ar">▶</span></div>
<div class="row r7"><span class="lb">记录查询</span><span class="ar">▶</span></div>
</div>
</div>
</body>
</html>
@@ -1,8 +1,8 @@
# 界面 01:主界面(根页)— 规格说明
> 配套样机:`01_主界面.html`(仅渲染页面本身)。本文件为设计规格(source of truth):布局参数、字符集核对、待确认问题、映射、LVGL 翻译要点。
> 本文件为设计规格(source of truth):布局参数、字符集核对、待确认问题、映射、LVGL 翻译要点。P1 照参数表翻译代码,P2 出图对照参数表 + 原图。
> 规则:160×160 设备像素 | 1bpp 纯黑白 | SimSun 12px(汉字 12px/字,ASCII 6px/字,行高 13)
> 布局依据:原图 `01_主界面原始图片.png`(628×631 @ 3.925x 缩放)实测 + 渲染目视比对。
> 布局依据:原图 `01_主界面原始图片.png`(628×631 @ 3.925x 缩放)实测 + 模拟器出图目视比对。
---
@@ -67,11 +67,11 @@
注:旧菜单中的"厂家设置"(L0,含 元件设置/恢复默认/版本显示/版本信息/装置遥调/装置记录)未出现在新 7 项列表中,入口待 Q3 确认。
## 六、LVGL 翻译要点(阶段 2 用)
## 六、LVGL 翻译要点(P1 用)
1. 列表 = 持久容器 `lv_obj`(x=0, y=44, 99×107,1px 边框)+ 7 个行子 `lv_obj`(高 15,绝对定位 `lv_obj_set_pos`,固定布局更可控)
2. 行 = `lv_obj` + `lv_label`(静态文本,左对齐 x=8)+ `lv_label`("▶",x=58,紧跟文字);选中行 = `LV_STATE_CHECKED` 整行反色(白底黑字,高亮铺满框宽)
3. 状态行 = `lv_label`(x=17, y=20,文本由 App 层供给,Q4)
4. 顶部装饰 = 开口浅 V(4 段折线:(7,7)→(16,17)→(145,17)→(158,7)):LVGL 可用 3 条 `lv_obj` 线段拼合(斜线用 `lv_line`),或预渲染 1bpp 位图 `lv_image`(更省对象、更精确)
5. 1bpp 禁区(本样机均未使用):圆角 / 阴影 / 透明度 / 渐变 / 多色
6. 内存:根页 = 1 列表容器 + 7 行 ×(行 obj + 2 label)+ 状态 label + 装饰 ≈ 20+ 个对象,为最高频页面,阶段 2 需核算 40KB LVGL 池占用
5. 1bpp 禁区(本设计均未使用):圆角 / 阴影 / 透明度 / 渐变 / 多色
6. 内存:根页 = 1 列表容器 + 7 行 ×(行 obj + 2 label)+ 状态 label + 装饰 ≈ 20+ 个对象,为最高频页面,P1 需核算 40KB LVGL 池占用
Binary file not shown.

Before

Width:  |  Height:  |  Size: 1.7 KiB