Close the chrome gaps: content behind bars on Templates, run detail, stage page and Schedules; Search field fills the bar
- SegmentedBar.titleWidget (and ShellBar/ShellBarSpec titleWidget, backgroundColor): a bar's main pill can be an input in place of the title; Search uses it so the field fills the bar with Kind and info, capped at the result column width so field and results share edges on wide windows. - Templates page/frame drop the top SafeArea again (BelowTopBar gate, TopBarNotices banners); Cupertino uses the grouped background. - Settings on Cupertino in the shell publishes the grouped background so the bar scrim matches the page (no white band or seam). - TopGlassStrip: the run detail header (status, actions, decision, notices) and the Schedules search/filter toolbar float as glass under the bar; tabs and lists scroll behind both. - Stage page: stage title and Visit/Run subtitle in the bar, facts lead the Summary scroll, sections scroll behind the bar under floating tabs. - Tests for content-behind-bar on each page and the title-widget bar mode; notes/chrome-gaps-fixes.md.
This commit is contained in:
@@ -124,17 +124,15 @@ class _SchedulesDestinationState extends State<SchedulesDestination> {
|
||||
),
|
||||
],
|
||||
);
|
||||
// The page reaches its top edge: the search strip floats under the bar
|
||||
// and the list scrolls behind both.
|
||||
if (cupertino) {
|
||||
return CupertinoPageScaffold(
|
||||
navigationBar: bar,
|
||||
child: SafeArea(child: body),
|
||||
child: SafeArea(top: false, bottom: false, child: body),
|
||||
);
|
||||
}
|
||||
return Scaffold(
|
||||
extendBodyBehindAppBar: true,
|
||||
appBar: bar,
|
||||
body: SafeArea(left: false, right: false, bottom: false, child: body),
|
||||
);
|
||||
return Scaffold(extendBodyBehindAppBar: true, appBar: bar, body: body);
|
||||
}
|
||||
|
||||
Widget _body(bool cupertino) {
|
||||
|
||||
@@ -8,7 +8,10 @@ import '../features/templates/ui/template_detail.dart'
|
||||
import '../shell/destination.dart';
|
||||
import '../shell/shell_bar.dart';
|
||||
import '../ui/adaptive/host.dart';
|
||||
import '../ui/adaptive/floating_bar_layout.dart';
|
||||
import '../ui/adaptive/segmented_bar.dart';
|
||||
import '../ui/adaptive/top_bar_notices.dart';
|
||||
import '../ui/theme/app_theme.dart';
|
||||
import 'app_session.dart';
|
||||
import 'connection_status.dart';
|
||||
import 'server_endpoint.dart';
|
||||
@@ -76,16 +79,22 @@ class _TemplatesDestinationState extends State<TemplatesDestination> {
|
||||
listenable: _bar,
|
||||
builder: (context, _) => _segmentedBar(cupertino),
|
||||
);
|
||||
// The page reaches its top edge: the gallery and an open template scroll
|
||||
// behind the bar and pad their own content by its height.
|
||||
final page = SafeArea(top: false, bottom: false, child: body);
|
||||
if (cupertino) {
|
||||
// Inset-grouped rows on the grouped background, as in Settings; the
|
||||
// bar's scrim takes the same colour.
|
||||
return CupertinoPageScaffold(
|
||||
backgroundColor: AppColors.groupedBackground,
|
||||
navigationBar: _BarSlot(cupertino: true, child: bar),
|
||||
child: SafeArea(child: body),
|
||||
child: page,
|
||||
);
|
||||
}
|
||||
return Scaffold(
|
||||
extendBodyBehindAppBar: true,
|
||||
appBar: _BarSlot(cupertino: false, child: bar),
|
||||
body: SafeArea(child: body),
|
||||
body: page,
|
||||
);
|
||||
}
|
||||
|
||||
@@ -113,25 +122,26 @@ class _TemplatesDestinationState extends State<TemplatesDestination> {
|
||||
Widget _body(bool cupertino) {
|
||||
final session = widget.session;
|
||||
if (!session.everConnected) {
|
||||
return ConnectionGate(
|
||||
session: session,
|
||||
server: widget.server,
|
||||
cupertino: cupertino,
|
||||
return BelowTopBar(
|
||||
child: ConnectionGate(
|
||||
session: session,
|
||||
server: widget.server,
|
||||
cupertino: cupertino,
|
||||
),
|
||||
);
|
||||
}
|
||||
return Column(
|
||||
children: [
|
||||
// A connection banner stays below the bar; the gallery keeps its place.
|
||||
return TopBarNotices(
|
||||
notices: [
|
||||
if (!session.connected)
|
||||
ConnectionBanner(session: session, cupertino: cupertino),
|
||||
Expanded(
|
||||
child: TemplatesScreen(
|
||||
gateway: session.gateway,
|
||||
embedded: true,
|
||||
onCreated: widget.onCreated,
|
||||
initialKey: widget.initialKey,
|
||||
),
|
||||
),
|
||||
],
|
||||
child: TemplatesScreen(
|
||||
gateway: session.gateway,
|
||||
embedded: true,
|
||||
onCreated: widget.onCreated,
|
||||
initialKey: widget.initialKey,
|
||||
),
|
||||
);
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user