Align wide desktop tabs to leading edge
This commit is contained in:
@@ -173,7 +173,7 @@ class _AdaptiveShellState extends State<AdaptiveShell> {
|
||||
// remounts a destination.
|
||||
//
|
||||
// While the tab shows its list beside an open item the bar moves under
|
||||
// the list pane, centred in the list's (dragged) width, so the open item
|
||||
// the leading edge of the list pane, so the open item
|
||||
// keeps its whole height: the list clears the bar and the item clears
|
||||
// only the system inset (see ListDetailPanes). The bar keeps its place
|
||||
// in the tree, so a split never replays its entrance.
|
||||
@@ -198,7 +198,7 @@ class _AdaptiveShellState extends State<AdaptiveShell> {
|
||||
currentIndex: index,
|
||||
onTap: (value) => _select(shellTabDestinations[value]),
|
||||
items: _destinationItems(),
|
||||
alignment: split ? Alignment.bottomCenter : null,
|
||||
alignment: split ? AlignmentDirectional.bottomStart : null,
|
||||
),
|
||||
);
|
||||
},
|
||||
|
||||
@@ -13,10 +13,11 @@ import 'floating_destination_labels.dart';
|
||||
/// frosted [GlassPill] buttons, one per tab, instead of a full-width system
|
||||
/// bar. Used for the app's destinations and for every page's own tabs.
|
||||
///
|
||||
/// The row is only as wide as its buttons and sits at the trailing (right,
|
||||
/// in left-to-right text) edge, near the thumb, keeping [kFloatingBarMargin]
|
||||
/// from the sides and above the bottom safe area. Only the buttons take
|
||||
/// taps: the gaps between and beside them reach the content behind. A row
|
||||
/// The row is only as wide as its buttons and, by default, sits at the trailing
|
||||
/// (right, in left-to-right text) edge, near the thumb, keeping
|
||||
/// [kFloatingBarMargin] from the sides and above the bottom safe area. Hosts
|
||||
/// can request another alignment for a pane-specific layout. Only the buttons
|
||||
/// take taps: the gaps between and beside them reach the content behind. A row
|
||||
/// squeezed below its natural width narrows its gaps, then scales down.
|
||||
///
|
||||
/// The selected button is filled with the host's selection tint, which
|
||||
@@ -48,8 +49,8 @@ class FloatingDestinationBar extends StatefulWidget {
|
||||
final bool showLabels;
|
||||
|
||||
/// Where the row sits in the width it is given, at [FloatingBarEdge.bottom]:
|
||||
/// the trailing end by default. The shell centres its tabs under the list
|
||||
/// pane while a list shows beside an open item.
|
||||
/// the trailing end by default. The shell can align its main tabs to the
|
||||
/// leading edge of a list pane while a list shows beside an open item.
|
||||
final AlignmentGeometry? alignment;
|
||||
|
||||
/// The edge the bar floats at. At [FloatingBarEdge.top] (an open item's
|
||||
|
||||
Reference in New Issue
Block a user