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) <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01FkzfwZf59HNP6R8jXcC1NR
This commit is contained in:
ImBenji
2026-10-11 03:37:08 +01:00
co-authored by Claude Opus 5
parent 7aa5cb8f8b
commit cc2fe99d02
+12 -1
View File
@@ -454,7 +454,18 @@ class _SelectState<T> extends State<Select<T>> {
SizedBox(width: gap), SizedBox(width: gap),
], ],
Expanded( 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) ...[ if (!widget.iconOnly) ...[
SizedBox(width: gap), SizedBox(width: gap),