From 44dad67417620c2ce73160a7b63a41a3da41f6b5 Mon Sep 17 00:00:00 2001 From: Jeroen Schweitzer Date: Wed, 22 Apr 2026 23:52:38 +0200 Subject: [PATCH] bump phosphor icon font to size 1.0, fix welcome tests Phosphor glyph fontSize set to 1.0 in unit space so glyphs fill the full icon size (16px in the rail). Welcome tests updated to match the redesigned view. Co-Authored-By: Claude Opus 4.6 (1M context) --- app/lib/widgets/src/clide_icon_rail.dart | 2 +- app/lib/widgets/src/icons/phosphor.dart | 2 +- app/test/builtin/welcome/widget_test.dart | 32 +++-------------------- 3 files changed, 5 insertions(+), 31 deletions(-) diff --git a/app/lib/widgets/src/clide_icon_rail.dart b/app/lib/widgets/src/clide_icon_rail.dart index e04e5e12..2140a9c6 100644 --- a/app/lib/widgets/src/clide_icon_rail.dart +++ b/app/lib/widgets/src/clide_icon_rail.dart @@ -106,7 +106,7 @@ class _RailButton extends StatelessWidget { ), ), ), - child: ClideIcon(item.icon, size: 14, color: color), + child: ClideIcon(item.icon, size: 16, color: color), ), ), ), diff --git a/app/lib/widgets/src/icons/phosphor.dart b/app/lib/widgets/src/icons/phosphor.dart index 60960ad6..21a55829 100644 --- a/app/lib/widgets/src/icons/phosphor.dart +++ b/app/lib/widgets/src/icons/phosphor.dart @@ -11,7 +11,7 @@ class PhosphorIconPainter extends ClideIconPainter { @override void paint(ui.Canvas canvas, ui.Color color) { final builder = ui.ParagraphBuilder( - ui.ParagraphStyle(fontFamily: family, fontSize: 0.75, height: 1.0, textAlign: ui.TextAlign.center), + ui.ParagraphStyle(fontFamily: family, fontSize: 1.0, height: 1.0, textAlign: ui.TextAlign.center), ) ..pushStyle(ui.TextStyle(color: color, fontFamily: family)) ..addText(String.fromCharCode(codePoint)); diff --git a/app/test/builtin/welcome/widget_test.dart b/app/test/builtin/welcome/widget_test.dart index 9d36f72f..a802bebf 100644 --- a/app/test/builtin/welcome/widget_test.dart +++ b/app/test/builtin/welcome/widget_test.dart @@ -43,37 +43,11 @@ void main() { expect(tabs.first.i18nNamespace, ext.id); }); - testWidgets('WelcomeView renders title + subtitle + Open-project button', - (tester) async { + testWidgets('WelcomeView renders title + subtitle + start actions', (tester) async { await tester.pumpWidget(harness(f, const WelcomeView())); expect(find.text('clide'), findsOneWidget); - expect( - find.text('Flutter desktop IDE for Claude Code'), - findsOneWidget, - ); - expect(find.text('Open project'), findsOneWidget); - }); - - testWidgets('Open-project action renders as tappable row', - (tester) async { - await tester.pumpWidget(harness(f, const WelcomeView())); - expect(find.text('Open project'), findsOneWidget); - }); - - testWidgets('locale switch refreshes the visible text', (tester) async { - await tester.pumpWidget(harness(f, const WelcomeView())); - f.services.i18n - .registerCatalog('builtin.welcome', const Locale('nl'), const { - 'title': {'translation': 'clide-nl'}, - 'subtitle': {'translation': 'Flutter IDE voor Claude Code'}, - 'open-project': {'translation': 'Project openen'}, - 'open-project.hint': {'translation': 'Kies een git repo'}, - 'tab.title': {'translation': 'Welkom'}, - }); - await f.services.i18n.setLocale(const Locale('nl')); - await tester.pumpAndSettle(); - expect(find.text('Project openen'), findsOneWidget); - expect(find.text('clide-nl'), findsOneWidget); + expect(find.text('Flutter desktop IDE for Claude Code'), findsOneWidget); + expect(find.text('Open folder…'), findsOneWidget); }); }); }