Shell: on wide split layouts the destination tabs sit under the list pane
The four destination buttons move from the bottom right over the detail pane to the bottom of the list pane, centred in the (dragged) list width. The list now keeps the bar's height as bottom clearance; the detail pane clears only the system inset, so its tabs, the chat composer and the artifact actions sit at its bottom edge. Phone layout is unchanged. kStackedBarGap is gone with the stacked bars.
This commit is contained in:
@@ -84,11 +84,11 @@ class ListPaneWidth extends StatelessWidget {
|
||||
/// Under the shell, the list keeps the shell's top bar (narrowed to the list
|
||||
/// pane through [ShellPaneSplit], see [ListPaneWidth]) and the open item owns
|
||||
/// the rest of the window: the detail starts at the top edge below the status
|
||||
/// bar ([ShellSystemInsets]). The shell's tab bar stays at the bottom right,
|
||||
/// over the detail pane, so the detail learns that bar's height plus
|
||||
/// [kStackedBarGap] as its bottom padding: its own tabs (or the chat
|
||||
/// composer) float above the shell's bar, never on it, and its content clears
|
||||
/// both. Pages the item opens stay in its pane ([DetailPaneNavigator]).
|
||||
/// bar ([ShellSystemInsets]). The shell's tab bar moves to the bottom of the
|
||||
/// list pane, so the list learns that bar's height as its bottom padding and
|
||||
/// the detail keeps its whole height: its own tabs (or the chat composer) sit
|
||||
/// at its bottom edge, above the system inset only. Pages the item opens stay
|
||||
/// in its pane ([DetailPaneNavigator]).
|
||||
class ListDetailPanes extends StatefulWidget {
|
||||
const ListDetailPanes({
|
||||
super.key,
|
||||
@@ -139,20 +139,20 @@ class _ListDetailPanesState extends State<ListDetailPanes> {
|
||||
final bodyWidth = math.max(0.0, available - 1 - listWidth);
|
||||
final bounds = listPaneWidthBounds(window, available);
|
||||
Widget body = widget.detail;
|
||||
Widget listPane = widget.list;
|
||||
if (split) {
|
||||
// Beside the list the item is not under the shell's top bar (it
|
||||
// stays over the list pane): it keeps the system's own top
|
||||
// inset, so its bar sits just below the status bar at the top
|
||||
// edge. The shell's tab bar floats at the bottom right, over
|
||||
// this pane; its height (the shell's bottom padding here) plus
|
||||
// a gap lifts the item's tabs or composer above it.
|
||||
// edge. The shell's tab bar floats at the bottom of the list
|
||||
// pane, not over this one, so the item clears only the
|
||||
// system's bottom inset and its own tabs or composer sit at
|
||||
// its bottom edge.
|
||||
final system = ShellSystemInsets.of(context);
|
||||
body = MediaQuery(
|
||||
data: media.copyWith(
|
||||
padding: media.padding.copyWith(
|
||||
top: system.top,
|
||||
bottom: media.padding.bottom + kStackedBarGap,
|
||||
bottom: system.bottom,
|
||||
),
|
||||
),
|
||||
child: PageTabsEdge(
|
||||
@@ -163,15 +163,8 @@ class _ListDetailPanesState extends State<ListDetailPanes> {
|
||||
),
|
||||
),
|
||||
);
|
||||
// The tab bar sits over the detail pane, never the list (the
|
||||
// detail is at least half the window, wider than the bar), so
|
||||
// the list clears only the system's bottom inset.
|
||||
listPane = MediaQuery(
|
||||
data: media.copyWith(
|
||||
padding: media.padding.copyWith(bottom: system.bottom),
|
||||
),
|
||||
child: widget.list,
|
||||
);
|
||||
// The list keeps the shell's bottom padding (the tab bar's
|
||||
// height), so its last rows scroll clear of the bar.
|
||||
}
|
||||
return Stack(
|
||||
children: [
|
||||
@@ -185,7 +178,7 @@ class _ListDetailPanesState extends State<ListDetailPanes> {
|
||||
container: true,
|
||||
explicitChildNodes: true,
|
||||
identifier: 'list-detail-list',
|
||||
child: listPane,
|
||||
child: widget.list,
|
||||
),
|
||||
),
|
||||
),
|
||||
|
||||
Reference in New Issue
Block a user