This commit is contained in:
Forrest 2026-08-04 16:08:51 -04:00
parent d558aba246
commit 3bd713d667
17 changed files with 1566 additions and 132 deletions

View file

@ -13,6 +13,7 @@ class HairlinePanel extends StatelessWidget {
required this.title,
required this.child,
this.trailing,
this.action,
this.active = false,
this.padding = const EdgeInsets.all(TimbreSpacing.lg),
this.backgroundColor = TimbreColors.background,
@ -24,6 +25,11 @@ class HairlinePanel extends StatelessWidget {
/// Optional trailing bit of the label, e.g. "(127)" — dimmed.
final String? trailing;
/// Optional compact controls straddling the *right* end of the top border,
/// mirroring the title's treatment. Keep it short (icons / small text) so it
/// sits cleanly on the hairline.
final Widget? action;
/// Panel content.
final Widget child;
@ -85,6 +91,16 @@ class HairlinePanel extends StatelessWidget {
),
),
),
if (action != null)
Positioned(
right: TimbreSpacing.md,
top: 0,
child: Container(
color: backgroundColor,
padding: const EdgeInsets.symmetric(horizontal: TimbreSpacing.xs),
child: action,
),
),
],
);
}