Make floating-window close buttons minimise
Remove the separate minimise control and make the title-bar X hide windows while preserving their state and reachability. Update window behavior documentation and focused tests for chat, terminal, and window layering.
This commit is contained in:
@@ -2,7 +2,7 @@ import 'package:flutter/widgets.dart';
|
||||
|
||||
import 'window_entry.dart';
|
||||
|
||||
/// One action in a window's title bar, before Minimise and Close (Dock on a
|
||||
/// One action in a window's title bar, before Maximise and the X (Dock on a
|
||||
/// chat, a kind's own menu).
|
||||
class WindowAction {
|
||||
const WindowAction({
|
||||
@@ -42,7 +42,7 @@ abstract class WindowKind {
|
||||
/// The window's content, below the title bar.
|
||||
Widget build(BuildContext context, WindowEntry entry);
|
||||
|
||||
/// Title-bar actions before Minimise and Close.
|
||||
/// Title-bar actions before Maximise and the X.
|
||||
List<WindowAction> actions(BuildContext context, WindowEntry entry) =>
|
||||
const [];
|
||||
|
||||
@@ -57,7 +57,7 @@ abstract class WindowKind {
|
||||
/// as its window takes focus. The default leaves it on the window.
|
||||
void focusContent(WindowEntry entry) {}
|
||||
|
||||
/// Called after the user closes the window (the X).
|
||||
/// Called after the window is closed (Dock, Close all, a chat's /close).
|
||||
void closed(WindowEntry entry) {}
|
||||
|
||||
/// Validates a saved window's [WindowEntry.data]; null drops the window.
|
||||
|
||||
Reference in New Issue
Block a user