Skip to content

Commit f637ee9

Browse files
committed
flutter_tray_icon_example: draw with DazzUI, follow the Omarchy theme
The example is now built on package:dazzui over WidgetsApp instead of its own palette and hand-drawn chips: Toggle and Button for the option and action chips, SegmentedControl for the tabs, OptionCard for the gallery tiles, Card for the preview, Badge for the click counters and checklist status, and a Dialog with a TextField for free-text values. The theme is Studio Light or Dark by platform brightness. On Omarchy the window wears the desktop instead: omarchy_theme.dart resolves ~/.local/state/omarchy/current/theme/colors.toml through omarchy-theme-color, maps the palette onto the design system's colour roles (ramps generated from the accent and the ANSI hues), takes every corner radius from Hyprland's decoration:rounding the way Omarchy's shell does, and watches the state directory so omarchy-theme-set switches the running app live. Toggle sizes itself to the whole line inside a Wrap, so each chip is wrapped in IntrinsicWidth until dazzui shrink-wraps it.
1 parent f3627fb commit f637ee9

11 files changed

Lines changed: 734 additions & 573 deletions

File tree

‎examples/flutter_tray_icon_example/README.md‎

Lines changed: 11 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,14 @@ A playground for `TrayIcon` and `TrayManager`, built to do three jobs in one sma
77
- **accept a platform** — every API has a control, and a checklist ticks itself;
88
- **record a demo** — everything is one click, no keyboard needed.
99

10-
It uses `package:flutter/widgets.dart` only, no component library.
10+
It is drawn with [DazzUI](https://pub.dev/packages/dazzui) over `WidgetsApp` — no
11+
material and nothing hand-drawn: every control is a `Toggle`, `Button`, `Badge`,
12+
`OptionCard`, `Card`, `SegmentedControl` or `Dialog` from the design system. The theme
13+
follows the platform's light or dark appearance; on [Omarchy](https://omarchy.org) it
14+
is the desktop's own palette (`~/.local/state/omarchy/current/theme/colors.toml`,
15+
resolved through `omarchy-theme-color`) with every corner at Hyprland's
16+
`decoration:rounding`, the way Omarchy's own shell draws, and it follows
17+
`omarchy-theme-set` live.
1118

1219
```bash
1320
flutter run -d macos # or windows, linux
@@ -59,7 +66,9 @@ preview's alpha shape and the menu bar picks the tint; resolution still matters
5966
| `lib/icon_animations.dart` | what the frames look like |
6067
| `lib/context_menu.dart` | the tray's context menu (normal, checkbox, disabled, submenu) |
6168
| `lib/checklist.dart` | checklist model and report |
62-
| `lib/tabs/`, `lib/widgets/` | the UI |
69+
| `lib/omarchy_theme.dart` | on Omarchy, the desktop's palette and Hyprland's rounding mapped onto the design system's tokens, watched for a theme switch |
70+
| `lib/widgets/option_chip.dart` | `OptionChip` (a DazzUI `Toggle`) and `ActionChip` (a `Button`): every setting is one of these |
71+
| `lib/tabs/`, `lib/widgets/` | the rest of the UI |
6372

6473
## Testing and recording
6574

0 commit comments

Comments
 (0)