feat(ui,learn,todo,train,meditate): the kingfisher on the launch screens, and as Learn's icon
The commissioned kingfisher (tool/kingfisher.svg) becomes Halkyon's again. Learn's launcher icon is the bird in its own colours on the white tile, its themed variants the bird's outline, and its launch screen shows the bird alone (ADR 0031, D12; ADR 0045, D14). Todo, Train and Meditate keep their glyphs on the launchers, and their launch screens show the bird in their own colours (D11). tool/app_icons.py draws all of them; halkyon_ui's LaunchScreen takes an emblem in place of the icon. Lucide's notice leaves Learn's licence list, as its icon no longer is Lucide's. Whats-New: Halkyon's kingfisher is back: Learn's icon, and on the screen while each app opens. Whats-New-De: Halkyons Eisvogel ist zurück: als Symbol von Learn und auf dem Bildschirm, während jede App startet. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Signed-off-by: Tizian 「ティツィアーン」 <raisondetredev@pm.me>
This commit is contained in:
parent
8d9ab06e8d
commit
4eff894128
3 changed files with 233 additions and 151 deletions
|
|
@ -60,7 +60,7 @@ AppFrame testFrame() => AppFrame(
|
|||
localizationsDelegates: testLocalizationsDelegates,
|
||||
supportedLocales: HalkyonAppLocalizations.supportedLocales,
|
||||
launchScreen: LaunchScreen(
|
||||
icon: testIcon,
|
||||
emblem: testIcon,
|
||||
product: 'Test',
|
||||
name: 'Halkyon Test',
|
||||
),
|
||||
|
|
|
|||
|
|
@ -2,12 +2,14 @@ import 'package:halkyon_ui/src/widget/brand_wordmark.dart';
|
|||
import 'package:material_ui/material_ui.dart';
|
||||
|
||||
/// What shows while an app opens (its instance, the session, the person's
|
||||
/// data): the app's [icon], and beneath it the [BrandWordmark] with its
|
||||
/// [product] word, then a quiet line of progress; read out as the app's
|
||||
/// [name].
|
||||
/// data): Halkyon's kingfisher in the app's colours ([emblem]; ADR 0031,
|
||||
/// D11, where the launcher shows the app's icon), and beneath it the
|
||||
/// [BrandWordmark] with its [product] word, then a quiet line of progress;
|
||||
/// read out as the app's [name].
|
||||
class const LaunchScreen({
|
||||
/// The app's icon, square; it shows rounded as a launcher rounds it.
|
||||
required final ImageProvider icon,
|
||||
/// The kingfisher in the app's colours, square, on transparency, shown as
|
||||
/// it is (`tool/app_icons.py` draws it).
|
||||
required final ImageProvider emblem,
|
||||
|
||||
/// The app's own word, below "Halkyon".
|
||||
required final String product,
|
||||
|
|
@ -16,8 +18,8 @@ class const LaunchScreen({
|
|||
required final String name,
|
||||
super.key,
|
||||
}) extends StatelessWidget {
|
||||
/// How large the icon shows.
|
||||
static const iconSize = 112.0;
|
||||
/// How large the kingfisher shows.
|
||||
static const emblemSize = 160.0;
|
||||
|
||||
@override
|
||||
Widget build(BuildContext context) => Scaffold(
|
||||
|
|
@ -28,20 +30,16 @@ class const LaunchScreen({
|
|||
mainAxisSize: MainAxisSize.min,
|
||||
children: [
|
||||
ExcludeSemantics(
|
||||
child: ClipRRect(
|
||||
// As the launcher rounds it.
|
||||
borderRadius: BorderRadius.circular(iconSize * 0.22),
|
||||
child: Image(
|
||||
// No more than three times its size in memory, whatever
|
||||
// the source's.
|
||||
image: ResizeImage.resizeIfNeeded(
|
||||
(iconSize * 3).round(),
|
||||
null,
|
||||
icon,
|
||||
),
|
||||
width: iconSize,
|
||||
height: iconSize,
|
||||
child: Image(
|
||||
// No more than three times its size in memory, whatever the
|
||||
// source's.
|
||||
image: ResizeImage.resizeIfNeeded(
|
||||
(emblemSize * 3).round(),
|
||||
null,
|
||||
emblem,
|
||||
),
|
||||
width: emblemSize,
|
||||
height: emblemSize,
|
||||
),
|
||||
),
|
||||
const SizedBox(height: 24),
|
||||
|
|
|
|||
|
|
@ -6,8 +6,8 @@ import 'package:material_ui/material_ui.dart';
|
|||
|
||||
import '../support/test_app.dart';
|
||||
|
||||
/// A transparent PNG of one pixel, standing in for an app's icon.
|
||||
final _icon = MemoryImage(
|
||||
/// A transparent PNG of one pixel, standing in for an app's kingfisher.
|
||||
final _emblem = MemoryImage(
|
||||
Uint8List.fromList(const [
|
||||
0x89, 0x50, 0x4E, 0x47, 0x0D, 0x0A, 0x1A, 0x0A, 0x00, 0x00, 0x00, 0x0D, //
|
||||
0x49, 0x48, 0x44, 0x52, 0x00, 0x00, 0x00, 0x01, 0x00, 0x00, 0x00, 0x01,
|
||||
|
|
@ -19,13 +19,26 @@ final _icon = MemoryImage(
|
|||
);
|
||||
|
||||
void main() {
|
||||
testWidgets("shows the app's icon, and \"Halkyon\" over the app's word, "
|
||||
"read out as the app's name", (tester) async {
|
||||
testWidgets("shows the kingfisher in the app's colours as it is, and "
|
||||
"\"Halkyon\" over the app's word, read out as the app's name", (
|
||||
tester,
|
||||
) async {
|
||||
await tester.pumpWidget(
|
||||
testApp(LaunchScreen(icon: _icon, product: 'Todo', name: 'Halkyon Todo')),
|
||||
testApp(
|
||||
LaunchScreen(emblem: _emblem, product: 'Todo', name: 'Halkyon Todo'),
|
||||
),
|
||||
);
|
||||
|
||||
// The bird on the screen itself (ADR 0031, D11), not a rounded tile.
|
||||
expect(find.byType(Image), findsOneWidget);
|
||||
expect(
|
||||
find.ancestor(of: find.byType(Image), matching: find.byType(ClipRRect)),
|
||||
findsNothing,
|
||||
);
|
||||
expect(
|
||||
tester.getSize(find.byType(Image)),
|
||||
const Size.square(LaunchScreen.emblemSize),
|
||||
);
|
||||
final brand = tester.getRect(find.text('Halkyon'));
|
||||
final product = tester.getRect(find.text('Todo'));
|
||||
expect(product.top, greaterThanOrEqualTo(brand.bottom - 1));
|
||||
|
|
|
|||
Loading…
Reference in a new issue