ui: make the sidebar rows compact again
Both the project band and the session rows are dense 56px list tiles now (measured 54), down from 72. Session titles are 14 and project names 14.5, so the list stays readable while the hierarchy keeps its tinted band. The project + and the session ⋮ still share one vertical line. 0.3.21 (321).
This commit is contained in:
1 parent
73af9d851b
commit
ff0dbf1b37
5 files changed
+23
-4
No files matched your search
@@ -5,6 +5,15 @@
|
|||||||
|
|
||||||
---
|
---
|
||||||
|
|
||||||
|
## 0.3.21 侧栏行更紧凑(分支 `flutter`)
|
||||||
|
|
||||||
|
| 项 | 结果 |
|
||||||
|
| --- | --- |
|
||||||
|
| 行高 | 项目条和会话行都改为 `dense: true` + `minTileHeight: 56`,实测都是 54(此前是 72);标题 14 / 项目名 14.5,路径与副标题保持较小字号 |
|
||||||
|
| 对齐 | 仍然等高等宽;`+` 与会话 `⋮` 的 x 中心保持对齐(测试断言) |
|
||||||
|
| 版本 | **0.3.21(code 321)** |
|
||||||
|
---
|
||||||
|
|
||||||
## 0.3.20 侧栏项目/会话行等高与右对齐、活动条改为 dsh-Go 胶囊(分支 `flutter`)
|
## 0.3.20 侧栏项目/会话行等高与右对齐、活动条改为 dsh-Go 胶囊(分支 `flutter`)
|
||||||
|
|
||||||
| 项 | 结果 |
|
| 项 | 结果 |
|
||||||
|
|||||||
@@ -5,7 +5,7 @@ Android first. This branch (`flutter`) is a framework evaluation: the same
|
|||||||
feature set as the earlier Asuka/Go and MyGo attempts, reimplemented in
|
feature set as the earlier Asuka/Go and MyGo attempts, reimplemented in
|
||||||
Flutter to compare mobile UI maturity.
|
Flutter to compare mobile UI maturity.
|
||||||
|
|
||||||
Status: 0.3.20 — servers (passwordless / password login, HTTP/HTTPS and
|
Status: 0.3.21 — servers (passwordless / password login, HTTP/HTTPS and
|
||||||
SOCKS5/socks5h proxy, self-signed certificates and pinning), session list with search and live
|
SOCKS5/socks5h proxy, self-signed certificates and pinning), session list with search and live
|
||||||
events, chat with streaming Markdown and full history paging, tool steps
|
events, chat with streaming Markdown and full history paging, tool steps
|
||||||
grouped per turn (icon, one-line summary, foldable run) with image previews, a
|
grouped per turn (icon, one-line summary, foldable run) with image previews, a
|
||||||
|
|||||||
@@ -307,6 +307,9 @@ class _SessionListPaneState extends State<SessionListPane> {
|
|||||||
borderRadius: BorderRadius.circular(10),
|
borderRadius: BorderRadius.circular(10),
|
||||||
clipBehavior: Clip.antiAlias,
|
clipBehavior: Clip.antiAlias,
|
||||||
child: ListTile(
|
child: ListTile(
|
||||||
|
// Compact like a session row: two dense lines in a 56px band.
|
||||||
|
dense: true,
|
||||||
|
minTileHeight: 56,
|
||||||
// The band already insets by 8. A Material 3 list tile ends at 24
|
// The band already insets by 8. A Material 3 list tile ends at 24
|
||||||
// (start 16), so 16 here makes the + line up with the session
|
// (start 16), so 16 here makes the + line up with the session
|
||||||
// rows' ⋮.
|
// rows' ⋮.
|
||||||
@@ -325,7 +328,7 @@ class _SessionListPaneState extends State<SessionListPane> {
|
|||||||
maxLines: 1,
|
maxLines: 1,
|
||||||
overflow: TextOverflow.ellipsis,
|
overflow: TextOverflow.ellipsis,
|
||||||
style: TextStyle(
|
style: TextStyle(
|
||||||
fontSize: 15,
|
fontSize: 14.5,
|
||||||
fontWeight: FontWeight.w700,
|
fontWeight: FontWeight.w700,
|
||||||
color: scheme.onSurface,
|
color: scheme.onSurface,
|
||||||
),
|
),
|
||||||
@@ -514,6 +517,9 @@ class _SessionListPaneState extends State<SessionListPane> {
|
|||||||
],
|
],
|
||||||
),
|
),
|
||||||
child: ListTile(
|
child: ListTile(
|
||||||
|
// Compact: both the project band and a session row are 56 high.
|
||||||
|
dense: true,
|
||||||
|
minTileHeight: 56,
|
||||||
selected: selected,
|
selected: selected,
|
||||||
selectedTileColor: scheme.primary.withValues(alpha: 0.10),
|
selectedTileColor: scheme.primary.withValues(alpha: 0.10),
|
||||||
title: Text(
|
title: Text(
|
||||||
@@ -521,6 +527,7 @@ class _SessionListPaneState extends State<SessionListPane> {
|
|||||||
maxLines: 1,
|
maxLines: 1,
|
||||||
overflow: TextOverflow.ellipsis,
|
overflow: TextOverflow.ellipsis,
|
||||||
style: TextStyle(
|
style: TextStyle(
|
||||||
|
fontSize: 14,
|
||||||
fontWeight: selected ? FontWeight.w600 : FontWeight.w400,
|
fontWeight: selected ? FontWeight.w600 : FontWeight.w400,
|
||||||
),
|
),
|
||||||
),
|
),
|
||||||
|
|||||||
+1
-1
@@ -2,7 +2,7 @@ name: openchamber
|
|||||||
description: "A lightweight OpenChamber client for phones."
|
description: "A lightweight OpenChamber client for phones."
|
||||||
publish_to: 'none'
|
publish_to: 'none'
|
||||||
|
|
||||||
version: 0.3.20+320
|
version: 0.3.21+321
|
||||||
|
|
||||||
environment:
|
environment:
|
||||||
sdk: ^3.14.0
|
sdk: ^3.14.0
|
||||||
|
|||||||
@@ -37,7 +37,10 @@ void main() {
|
|||||||
of: find.text('标签页拖拽与分屏'),
|
of: find.text('标签页拖拽与分屏'),
|
||||||
matching: find.byType(ListTile),
|
matching: find.byType(ListTile),
|
||||||
);
|
);
|
||||||
expect(tester.getSize(header).height, tester.getSize(row).height);
|
final headerHeight = tester.getSize(header).height;
|
||||||
|
expect(tester.getSize(row).height, headerHeight);
|
||||||
|
// Compact, close to the old 56px project band.
|
||||||
|
expect(headerHeight, lessThanOrEqualTo(58));
|
||||||
|
|
||||||
// The project's + and the session's ⋮ share one vertical line.
|
// The project's + and the session's ⋮ share one vertical line.
|
||||||
final add = tester.getCenter(find.byTooltip('在此项目新会话'));
|
final add = tester.getCenter(find.byTooltip('在此项目新会话'));
|
||||||
|
|||||||
Reference in new issue
Block a user