diff --git a/LATER.md b/LATER.md index c52ada2..ccb6162 100644 --- a/LATER.md +++ b/LATER.md @@ -1,5 +1,10 @@ # Later +make `task check` faster. +It gets executed via pre-commit.... Must be fast. + +--- + Flutter best practices? --- diff --git a/linux/my_application.cc b/linux/my_application.cc index 8ded7d5..609bf5f 100644 --- a/linux/my_application.cc +++ b/linux/my_application.cc @@ -21,7 +21,6 @@ static void my_application_activate(GApplication* application) { gtk_window_set_default_size(window, 1280, 800); gtk_widget_set_size_request(GTK_WIDGET(window), 400, 300); - gtk_widget_show(GTK_WIDGET(window)); g_autoptr(FlDartProject) project = fl_dart_project_new(); fl_dart_project_set_dart_entrypoint_arguments( @@ -32,6 +31,10 @@ static void my_application_activate(GApplication* application) { fl_register_plugins(FL_PLUGIN_REGISTRY(view)); + // Show AFTER adding FlView so GTK's first layout pass allocates the full + // window content area (1280×800) to FlView, not the default 1×1. + gtk_widget_show_all(GTK_WIDGET(window)); + gtk_widget_grab_focus(GTK_WIDGET(view)); } diff --git a/test/widget/account_list_screen_test.dart b/test/widget/account_list_screen_test.dart index f0caf75..2241c70 100644 --- a/test/widget/account_list_screen_test.dart +++ b/test/widget/account_list_screen_test.dart @@ -146,7 +146,7 @@ void main() { expect(find.text('Add account'), findsOneWidget); }); - testWidgets('AppBar does not overflow at narrow window size', (tester) async { + testWidgets('AppBar does not overflow at minimum supported window size', (tester) async { tester.view.physicalSize = const Size(400, 300); tester.view.devicePixelRatio = 1.0; addTearDown(tester.view.resetPhysicalSize); @@ -166,6 +166,7 @@ void main() { await tester.pumpAndSettle(); expect(tester.takeException(), isNull); + expect(find.text('SharedInbox'), findsOneWidget); }); }); }