Skip to content

Commit

Permalink
fix: Accomodate long switch channel buttons texts
Browse files Browse the repository at this point in the history
  • Loading branch information
spydon committed Oct 3, 2024
1 parent fc52b0d commit a951122
Showing 1 changed file with 7 additions and 5 deletions.
12 changes: 7 additions & 5 deletions packages/app_center/lib/snapd/snap_page.dart
Original file line number Diff line number Diff line change
Expand Up @@ -336,11 +336,13 @@ class _SnapActionButtons extends ConsumerWidget {
}

final hasActiveChange = snapData.activeChangeId != null;
final primaryActionButton = SizedBox(
width: _kPrimaryButtonMaxWidth,
final primaryActionButton = Flexible(
child: PushButton.elevated(
onPressed: primaryAction.callback(snapData, snapModel, snapLauncher),
child: Text(primaryAction.label(l10n)),
child: Text(
primaryAction.label(l10n),
overflow: TextOverflow.ellipsis,
),
),
);

Expand Down Expand Up @@ -383,8 +385,8 @@ class _SnapActionButtons extends ConsumerWidget {
snapName: snapModel.snapName,
activeChangeId: snapData.activeChangeId!,
)
: OverflowBar(
overflowSpacing: 8,
: Row(
mainAxisSize: MainAxisSize.min,
children: [
primaryActionButton,
if (snapData.isInstalled && snapData.activeChangeId == null)
Expand Down

0 comments on commit a951122

Please sign in to comment.