Refine Settings destination shell integration
Keep Settings navigation independent while preserving shell actions and destination-specific state. Add the reviewed chat, run-entry, layout, and regression-test updates needed by the destination behavior.
This commit is contained in:
@@ -0,0 +1,42 @@
|
||||
import 'package:flutter/material.dart';
|
||||
|
||||
import '../../../ui/motion/motion.dart';
|
||||
|
||||
/// The opacity of the surface scrim over an inactive split pane. The pane's
|
||||
/// transcript and bars keep reading through it at about two thirds emphasis.
|
||||
const double chatPaneDimOpacity = 0.35;
|
||||
|
||||
/// Covers a pane that is not the active one with the theme's surface colour,
|
||||
/// so the active pane reads as the one in focus. The scrim ignores pointers:
|
||||
/// taps reach the pane's content, and its activation listener still runs.
|
||||
/// Reduced motion switches the scrim at once; otherwise it fades briefly.
|
||||
class ChatPaneDim extends StatelessWidget {
|
||||
const ChatPaneDim({super.key, required this.dimmed, required this.child});
|
||||
|
||||
final bool dimmed;
|
||||
final Widget child;
|
||||
|
||||
@override
|
||||
Widget build(BuildContext context) {
|
||||
final surface = Theme.of(context).colorScheme.surface;
|
||||
return Stack(
|
||||
fit: StackFit.passthrough,
|
||||
children: [
|
||||
child,
|
||||
Positioned.fill(
|
||||
child: IgnorePointer(
|
||||
child: AnimatedContainer(
|
||||
key: const ValueKey('chat-pane-dim-scrim'),
|
||||
duration: Motion.of(context, Motion.standard),
|
||||
curve: Motion.curve,
|
||||
// The clear end keeps the surface hue, so the fade never greys.
|
||||
color: dimmed
|
||||
? surface.withValues(alpha: chatPaneDimOpacity)
|
||||
: surface.withValues(alpha: 0),
|
||||
),
|
||||
),
|
||||
),
|
||||
],
|
||||
);
|
||||
}
|
||||
}
|
||||
@@ -15,6 +15,7 @@ import 'chat_pane_move_motion.dart';
|
||||
import 'chat_pane_move_shortcuts.dart';
|
||||
import 'chat_pane_switch_motion.dart';
|
||||
import 'chat_pane_backdrop.dart';
|
||||
import 'chat_pane_dim.dart';
|
||||
import 'chat_workspace_pane_scope.dart';
|
||||
import 'chat_workspace_surface.dart';
|
||||
import '../../../ui/input/keyboard_owner.dart';
|
||||
@@ -509,8 +510,11 @@ class _ChatWorkspaceState extends State<ChatWorkspace>
|
||||
onPreferredWidthChanged: (width) =>
|
||||
_reportPaneExtraWidth(pane.id, width),
|
||||
child: Builder(
|
||||
builder: (paneContext) =>
|
||||
widget.paneBuilder(paneContext, pane, active),
|
||||
builder: (paneContext) => ChatPaneDim(
|
||||
// A single pane is always the active one, so it never dims.
|
||||
dimmed: widget.controller.paneCount > 1 && !active,
|
||||
child: widget.paneBuilder(paneContext, pane, active),
|
||||
),
|
||||
),
|
||||
),
|
||||
),
|
||||
|
||||
Reference in New Issue
Block a user