Merge main (Compact design) into Glass
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This commit is contained in:
@@ -1,5 +1,4 @@
|
||||
import '../ui/adaptive/window_margins.dart';
|
||||
import '../ui/theme/app_design.dart';
|
||||
import '../ui/theme/app_design_controller.dart';
|
||||
import '../ui/theme/glass_backdrop.dart';
|
||||
import '../ui/theme/app_font_controller.dart';
|
||||
@@ -56,11 +55,12 @@ class MyApp extends StatelessWidget {
|
||||
final designs = this.designs ?? AppDesignController.instance;
|
||||
return ListenableBuilder(
|
||||
listenable: Listenable.merge([fonts, designs]),
|
||||
builder: (context, _) => _host(designs.design, fonts.family),
|
||||
builder: (context, _) => _host(designs, fonts.family),
|
||||
);
|
||||
}
|
||||
|
||||
Widget _host(AppDesign design, String? fontFamily) {
|
||||
Widget _host(AppDesignController designs, String? fontFamily) {
|
||||
final design = designs.design;
|
||||
final router = routerConfig;
|
||||
if (router != null) {
|
||||
return MaterialApp.router(
|
||||
@@ -69,6 +69,7 @@ class MyApp extends StatelessWidget {
|
||||
builder: _scaled,
|
||||
theme: design.light(fontFamily: fontFamily),
|
||||
darkTheme: design.dark(fontFamily: fontFamily),
|
||||
themeAnimationDuration: designs.themeAnimationDuration,
|
||||
themeMode: ThemeMode.system,
|
||||
routerConfig: router,
|
||||
);
|
||||
@@ -79,6 +80,7 @@ class MyApp extends StatelessWidget {
|
||||
builder: _scaled,
|
||||
theme: design.light(fontFamily: fontFamily),
|
||||
darkTheme: design.dark(fontFamily: fontFamily),
|
||||
themeAnimationDuration: designs.themeAnimationDuration,
|
||||
themeMode: ThemeMode.system,
|
||||
home: AdaptiveShell(
|
||||
destinationBodies: destinationBodies,
|
||||
|
||||
@@ -28,6 +28,7 @@ import 'detached_route.dart';
|
||||
import 'detached_terminal.dart';
|
||||
import 'detached_window_body.dart';
|
||||
import 'detached_windows.dart';
|
||||
import '../../features/chat/speech/app_speech.dart';
|
||||
|
||||
/// A detached window's whole app: one item ([route]) over its own
|
||||
/// connection, without the shell (no navigation rail, lists, floating
|
||||
@@ -120,6 +121,9 @@ class _DetachedWindowAppState extends State<DetachedWindowApp> {
|
||||
|
||||
@override
|
||||
void dispose() {
|
||||
// A reply read aloud belongs to this app's server: switching servers (a
|
||||
// fresh app) or closing the window ends it.
|
||||
unawaited(speechControllerIfCreated?.stop());
|
||||
_session.removeListener(_connectionChanged);
|
||||
widget.chatPool?.removeListener(_connectionChanged);
|
||||
_terminals?.dispose();
|
||||
@@ -226,6 +230,7 @@ class _DetachedWindowAppState extends State<DetachedWindowApp> {
|
||||
),
|
||||
theme: designs.design.light(fontFamily: fonts.family),
|
||||
darkTheme: designs.design.dark(fontFamily: fonts.family),
|
||||
themeAnimationDuration: designs.themeAnimationDuration,
|
||||
themeMode: ThemeMode.system,
|
||||
// The window's one page is named by its route, so the address bar
|
||||
// (and a reload) keeps the detached location instead of `/`.
|
||||
|
||||
@@ -84,6 +84,7 @@ import 'templates_destination.dart';
|
||||
import 'tab_locations.dart';
|
||||
import 'tab_locations_store.dart';
|
||||
import '../ui/input/keyboard_owner.dart';
|
||||
import '../features/chat/speech/app_speech.dart';
|
||||
|
||||
/// The application's return-to-foreground policy for the shared socket.
|
||||
///
|
||||
@@ -643,6 +644,9 @@ class _PipelinesAppState extends State<PipelinesApp>
|
||||
|
||||
@override
|
||||
void dispose() {
|
||||
// A reply read aloud belongs to this app's server: switching servers (a
|
||||
// fresh app) or closing the window ends it.
|
||||
unawaited(speechControllerIfCreated?.stop());
|
||||
_stopAsking();
|
||||
_tabLocations.dispose();
|
||||
WidgetsBinding.instance.removeObserver(this);
|
||||
|
||||
@@ -392,6 +392,7 @@ class _PipelinesRootState extends State<PipelinesRoot> {
|
||||
),
|
||||
theme: designs.design.light(fontFamily: fonts.family),
|
||||
darkTheme: designs.design.dark(fontFamily: fonts.family),
|
||||
themeAnimationDuration: designs.themeAnimationDuration,
|
||||
debugShowCheckedModeBanner: false,
|
||||
home: flow,
|
||||
),
|
||||
|
||||
Reference in New Issue
Block a user