Keep even 16px window margins for top bars on wide windows
On a wide window (both sides at least 600 logical px) every SegmentedBar keeps the floating tab bar's 16px from the top and the sides, in every pane and page. A root WindowMargins scope adds the extra 8px to the top media padding, so Cupertino's fixed reserved bar height, list clearances, pinned headers and measured overlays all move together; the bar and the TopGlassStrip read the 16px side inset from the same scope, and sticky section chevrons keep 16px from the trailing edge. Phones keep 8/12.
This commit is contained in:
@@ -4,6 +4,7 @@ import 'package:flutter/cupertino.dart';
|
||||
import 'package:flutter/material.dart';
|
||||
|
||||
import '../adaptive/host.dart';
|
||||
import '../adaptive/window_margins.dart';
|
||||
import '../theme/app_theme.dart';
|
||||
import '../motion/motion.dart';
|
||||
import 'section_heading.dart';
|
||||
@@ -197,8 +198,13 @@ class StickySectionTitle extends StatelessWidget {
|
||||
color: muted,
|
||||
),
|
||||
);
|
||||
// On a wide window the chevron keeps the title's 16 px from the edge, in
|
||||
// line with the top bar's trailing piece; a phone keeps it closer.
|
||||
final row = Padding(
|
||||
padding: const EdgeInsetsDirectional.only(start: 16, end: 8),
|
||||
padding: EdgeInsetsDirectional.only(
|
||||
start: 16,
|
||||
end: WindowMargins.wideOf(context) ? 16 : 8,
|
||||
),
|
||||
child: Row(
|
||||
children: [
|
||||
Expanded(
|
||||
|
||||
Reference in New Issue
Block a user