Preserve caption focus and scale readable chat controls
This commit is contained in:
@@ -12,6 +12,8 @@ import '../ui/sessions/chat_adaptive.dart';
|
||||
/// pill with the conversation's title and folder that opens the chat's
|
||||
/// information, a selector island holding [controls] (model and mode),
|
||||
/// then the Files action and a native More menu in a separate island.
|
||||
/// Narrow panes give readable model/mode values a separate row; exceptionally
|
||||
/// short viewports can scroll the header to keep controls reachable.
|
||||
class ChatThreadHeader extends StatelessWidget {
|
||||
const ChatThreadHeader({
|
||||
super.key,
|
||||
@@ -50,7 +52,9 @@ class ChatThreadHeader extends StatelessWidget {
|
||||
chatControlsStyleOf(context) == ChatControlsStyle.cupertino;
|
||||
return LayoutBuilder(
|
||||
builder: (context, constraints) {
|
||||
final narrow = constraints.maxWidth < 800;
|
||||
final textScale = MediaQuery.textScalerOf(context).scale(14) / 14;
|
||||
final readableWidth = constraints.maxWidth / textScale;
|
||||
final narrow = readableWidth < 800;
|
||||
final bar = SegmentedBar(
|
||||
cupertino: cupertino,
|
||||
automaticallyImplyLeading: false,
|
||||
@@ -121,7 +125,7 @@ class ChatThreadHeader extends StatelessWidget {
|
||||
child: _ControlIsland(
|
||||
key: const Key('chat-model-permission-island'),
|
||||
fill: true,
|
||||
vertical: constraints.maxWidth < 340,
|
||||
vertical: readableWidth < 340,
|
||||
children: controls,
|
||||
),
|
||||
),
|
||||
|
||||
Reference in New Issue
Block a user