style: align sidebar tree chevrons and give titles more room
The project band no longer adds inner padding, so its folder chevron and + sit on the same two vertical lines as the session rows' subagent chevron and ⋮. Every session row now reserves the same 18px chevron column, so a session without subagents starts its title exactly where a parent does, and the compact left/right insets leave the title more width. 0.4.11 (411).
This commit is contained in:
1 parent
9cbd97d532
commit
0f850b6191
6 files changed
+83
-14
No files matched your search
@@ -315,10 +315,11 @@ class _SessionListPaneState extends State<SessionListPane> {
|
||||
// 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
|
||||
// (start 16), so 16 here makes the + line up with the session
|
||||
// rows' ⋮.
|
||||
contentPadding: const EdgeInsets.only(left: 8, right: 16),
|
||||
// The band already insets by 8, the same as a session row's
|
||||
// content padding. No padding inside it then makes the folder
|
||||
// chevron and the + share one vertical line with the session rows'
|
||||
// chevron and ⋮.
|
||||
contentPadding: EdgeInsets.zero,
|
||||
leading: Row(
|
||||
mainAxisSize: MainAxisSize.min,
|
||||
children: [
|
||||
@@ -576,16 +577,22 @@ class _SessionListPaneState extends State<SessionListPane> {
|
||||
// Compact: both the project band and a session row are 56 high.
|
||||
dense: true,
|
||||
minTileHeight: 56,
|
||||
// A fixed chevron column for every session row: rows without
|
||||
// subagents keep the same title start as rows with them. A short gap
|
||||
// after it keeps the title space wide.
|
||||
contentPadding: child
|
||||
? const EdgeInsets.only(left: 32, right: 8)
|
||||
: const EdgeInsets.only(left: 8, right: 8),
|
||||
horizontalTitleGap: 8,
|
||||
selected: selected,
|
||||
selectedTileColor: scheme.primary.withValues(alpha: 0.10),
|
||||
leading: child
|
||||
? Icon(Icons.smart_toy_outlined,
|
||||
size: 16, color: scheme.onSurfaceVariant)
|
||||
? null
|
||||
: children.isEmpty
|
||||
? null
|
||||
? const SizedBox(width: 18)
|
||||
: SizedBox(
|
||||
width: 32,
|
||||
height: 32,
|
||||
width: 18,
|
||||
height: 40,
|
||||
child: IconButton(
|
||||
icon: Icon(
|
||||
expanded
|
||||
@@ -596,7 +603,7 @@ class _SessionListPaneState extends State<SessionListPane> {
|
||||
padding: EdgeInsets.zero,
|
||||
visualDensity: VisualDensity.compact,
|
||||
constraints:
|
||||
const BoxConstraints(minWidth: 32, minHeight: 32),
|
||||
const BoxConstraints(minWidth: 18, minHeight: 40),
|
||||
onPressed: () => setState(() {
|
||||
if (expanded) {
|
||||
_expandedChildren.remove(session.id);
|
||||
|
||||
Reference in new issue
Block a user