feat(app): segmented glass top bar across the app
Extract the chat's segmented bar into lib/ui/adaptive (SegmentedBar, GlassPill, SegmentedBarOverlay) and use it for the shell bar, DetailPane and every page-level bar. Pieces are frosted glass over a fading scrim; only pills take taps. Actions keep their natural width so the title gives way before a model name. The chat transcript scrolls behind its header.
This commit is contained in:
@@ -1,3 +1,4 @@
|
||||
import '../../ui/adaptive/segmented_bar.dart';
|
||||
import '../../shell/destination.dart';
|
||||
import '../../shell/detail_page.dart';
|
||||
import '../../shell/list_detail.dart';
|
||||
@@ -351,8 +352,10 @@ class _PipelinesScreenState extends State<PipelinesScreen> {
|
||||
|
||||
Widget _materialShell(BuildContext context, Widget body) {
|
||||
return Scaffold(
|
||||
appBar: AppBar(
|
||||
title: const Text('Pipelines'),
|
||||
extendBodyBehindAppBar: true,
|
||||
appBar: SegmentedBar(
|
||||
cupertino: false,
|
||||
title: 'Pipelines',
|
||||
actions: [
|
||||
...pipelineListActions(context, _controller),
|
||||
if (widget.onOpenSchedules != null) _schedulesButton(context),
|
||||
@@ -365,18 +368,16 @@ class _PipelinesScreenState extends State<PipelinesScreen> {
|
||||
|
||||
Widget _cupertinoShell(BuildContext context, Widget body) {
|
||||
return CupertinoPageScaffold(
|
||||
navigationBar: CupertinoNavigationBar(
|
||||
middle: const Text('Pipelines'),
|
||||
trailing: Row(
|
||||
mainAxisSize: MainAxisSize.min,
|
||||
children: [
|
||||
...pipelineListActions(context, _controller),
|
||||
if (widget.onOpenSchedules != null) _schedulesButton(context),
|
||||
_refreshButton(context),
|
||||
],
|
||||
),
|
||||
navigationBar: SegmentedBar(
|
||||
cupertino: true,
|
||||
title: 'Pipelines',
|
||||
actions: [
|
||||
...pipelineListActions(context, _controller),
|
||||
if (widget.onOpenSchedules != null) _schedulesButton(context),
|
||||
_refreshButton(context),
|
||||
],
|
||||
),
|
||||
child: SafeArea(top: false, child: body),
|
||||
child: SafeArea(child: body),
|
||||
);
|
||||
}
|
||||
}
|
||||
|
||||
@@ -1,6 +1,7 @@
|
||||
import 'package:flutter/cupertino.dart';
|
||||
import 'package:flutter/material.dart';
|
||||
|
||||
import '../../../ui/adaptive/segmented_bar.dart';
|
||||
import '../pipeline_filter.dart';
|
||||
import 'pipeline_controls.dart';
|
||||
import 'pipeline_filter_cupertino_body.dart';
|
||||
@@ -99,20 +100,25 @@ class _PipelineFilterPageState extends State<PipelineFilterPage> {
|
||||
);
|
||||
if (widget.cupertino) {
|
||||
return CupertinoPageScaffold(
|
||||
navigationBar: CupertinoNavigationBar(
|
||||
middle: const Text('Filter pipelines'),
|
||||
trailing: CupertinoButton(
|
||||
padding: EdgeInsets.zero,
|
||||
onPressed: _apply,
|
||||
child: const Text('Done'),
|
||||
),
|
||||
navigationBar: SegmentedBar(
|
||||
cupertino: true,
|
||||
title: 'Filter pipelines',
|
||||
actions: [
|
||||
CupertinoButton(
|
||||
padding: const EdgeInsets.symmetric(horizontal: 16),
|
||||
onPressed: _apply,
|
||||
child: const Text('Done'),
|
||||
),
|
||||
],
|
||||
),
|
||||
child: SafeArea(child: body),
|
||||
);
|
||||
}
|
||||
return Scaffold(
|
||||
appBar: AppBar(
|
||||
title: const Text('Filter pipelines'),
|
||||
extendBodyBehindAppBar: true,
|
||||
appBar: SegmentedBar(
|
||||
cupertino: false,
|
||||
title: 'Filter pipelines',
|
||||
actions: [TextButton(onPressed: _apply, child: const Text('Done'))],
|
||||
),
|
||||
body: SafeArea(child: body),
|
||||
|
||||
Reference in New Issue
Block a user