Merge commit '3f05421e8b61f063155eb61a166edcee910b750a' into pipelines/run-20261111-1928-focus-chat-composer-when-toggling-from-f-1ed3
This commit is contained in:
@@ -82,6 +82,7 @@ class FilesHeader extends StatelessWidget {
|
||||
),
|
||||
AppOverflowMenu<FilesSortKey>(
|
||||
label: 'Sort',
|
||||
icon: const Icon(Icons.sort),
|
||||
onSelected: (_, key) =>
|
||||
controller.setSort(controller.sort.reverseOr(key)),
|
||||
actions: [
|
||||
|
||||
@@ -128,6 +128,27 @@ class WindowFrame extends StatelessWidget {
|
||||
);
|
||||
}
|
||||
|
||||
/// The foreground edge of a floating window. This is separate from
|
||||
/// [WindowFrame] because the window body is painted by a later navigator
|
||||
/// child and may otherwise cover the card's decoration.
|
||||
class WindowOutline extends StatelessWidget {
|
||||
const WindowOutline({super.key});
|
||||
|
||||
@override
|
||||
Widget build(BuildContext context) {
|
||||
final colors = Theme.of(context).colorScheme;
|
||||
return IgnorePointer(
|
||||
child: DecoratedBox(
|
||||
decoration: BoxDecoration(
|
||||
border: Border.all(color: colors.outlineVariant),
|
||||
borderRadius: BorderRadius.circular(windowCornerRadius),
|
||||
),
|
||||
child: const SizedBox.expand(),
|
||||
),
|
||||
);
|
||||
}
|
||||
}
|
||||
|
||||
/// The lower right corner of a window: drag to resize.
|
||||
class WindowResizeCorner extends StatelessWidget {
|
||||
const WindowResizeCorner({
|
||||
|
||||
@@ -300,6 +300,7 @@ class _WindowLayerState extends State<WindowLayer>
|
||||
onResizeEnd: _resizeEnded,
|
||||
),
|
||||
),
|
||||
Positioned.fromRect(rect: frame, child: const WindowOutline()),
|
||||
],
|
||||
);
|
||||
final center = widget.bounds.center(Offset.zero);
|
||||
|
||||
@@ -33,6 +33,7 @@ class AppOverflowMenu<T> extends StatelessWidget {
|
||||
this.label = 'More actions',
|
||||
this.sheetTitle,
|
||||
this.enabled = true,
|
||||
this.icon = const Icon(Icons.more_vert),
|
||||
});
|
||||
|
||||
final List<AppMenuAction<T>> actions;
|
||||
@@ -48,6 +49,10 @@ class AppOverflowMenu<T> extends StatelessWidget {
|
||||
|
||||
final bool enabled;
|
||||
|
||||
/// The button glyph. Most callers use the default overflow icon; controls
|
||||
/// whose action has a distinct meaning can provide a matching Material icon.
|
||||
final Widget icon;
|
||||
|
||||
@override
|
||||
Widget build(BuildContext context) {
|
||||
if (actions.isEmpty) return const SizedBox.shrink();
|
||||
@@ -57,7 +62,7 @@ class AppOverflowMenu<T> extends StatelessWidget {
|
||||
child: Material(
|
||||
type: MaterialType.transparency,
|
||||
child: PopupMenuButton<T>(
|
||||
icon: const Icon(Icons.more_vert),
|
||||
icon: icon,
|
||||
tooltip: label,
|
||||
enabled: enabled,
|
||||
onSelected: (value) => onSelected(context, value),
|
||||
|
||||
Reference in New Issue
Block a user