From cc2fe99d024a641e0d91a5ee95db101109fcbae5 Mon Sep 17 00:00:00 2001 From: ImBenji Date: Sun, 11 Oct 2026 03:37:08 +0100 Subject: [PATCH] fix(garage_ui): a Select trigger was as tall as whatever contained it The value sat in an Align with no heightFactor, and an Align with no factor on an axis FILLS that axis. The Row hands its children a loose vertical constraint, so the trigger took every pixel it was offered: 600 in a test against the default viewport, and "however tall the pane is" in the app, while every button and field beside it sat on controlHeight. The other _Btn branch never hit it because it goes through an IntrinsicHeight. Width still fills, which is the part that Align was there for. Co-Authored-By: Claude Opus 5 (1M context) Claude-Session: https://claude.ai/code/session_01FkzfwZf59HNP6R8jXcC1NR --- garage_ui/lib/select.dart | 13 ++++++++++++- 1 file changed, 12 insertions(+), 1 deletion(-) diff --git a/garage_ui/lib/select.dart b/garage_ui/lib/select.dart index ff92205..be32c44 100644 --- a/garage_ui/lib/select.dart +++ b/garage_ui/lib/select.dart @@ -454,7 +454,18 @@ class _SelectState extends State> { SizedBox(width: gap), ], Expanded( - child: Align(alignment: Alignment.center, child: valueChild), + // heightFactor, or this Align eats the whole viewport. An Align with + // no factor on an axis FILLS that axis, and the Row hands its + // children a loose vertical constraint, so the trigger measured 600 + // tall in a test and "however tall the pane is" in the app - while + // every button and field beside it sat on controlHeight. The other + // _Btn branch never hit it because its wrapped in an IntrinsicHeight. + // Width still fills, which is the bit we actually wanted. + child: Align( + alignment: Alignment.center, + heightFactor: 1, + child: valueChild, + ), ), if (!widget.iconOnly) ...[ SizedBox(width: gap),