Skip to content

Commit

Permalink
fix: Improvements for devices with text scale multipliers (#5995)
Browse files Browse the repository at this point in the history
  • Loading branch information
g123k authored Dec 4, 2024
1 parent b471a36 commit 8bf8299
Show file tree
Hide file tree
Showing 3 changed files with 13 additions and 7 deletions.
13 changes: 7 additions & 6 deletions packages/smooth_app/lib/pages/image/product_image_widget.dart
Original file line number Diff line number Diff line change
Expand Up @@ -89,20 +89,21 @@ class ProductImageWidget extends StatelessWidget {
horizontal: SMALL_SPACE,
vertical: VERY_SMALL_SPACE,
),
child: Stack(
child: Row(
children: <Widget>[
Center(
Expanded(
child: AutoSizeText(
date,
maxLines: 1,
textAlign: TextAlign.center,
style: const TextStyle(color: Colors.white),
),
),
if (expired)
Positioned.directional(
end: 0.0,
height: 20.0,
textDirection: Directionality.of(context),
Padding(
padding: const EdgeInsetsDirectional.only(
start: VERY_SMALL_SPACE,
),
child: icons.Outdated(
size: 18.0,
color: colors.orange,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -344,6 +344,7 @@ class _ProductCompatibilityScore extends StatelessWidget {
maxLines: 1,
textAlign: TextAlign.center,
overflow: TextOverflow.fade,
textScaler: TextScaler.noScaling,
style: TextStyle(
fontSize: _getCompatibilityFontSize(compatibilityLabel),
height: 0.9,
Expand Down
6 changes: 5 additions & 1 deletion packages/smooth_app/lib/widgets/smooth_navigation_bar.dart
Original file line number Diff line number Diff line change
Expand Up @@ -226,7 +226,11 @@ class _SmoothNavigationBarItemState extends State<_SmoothNavigationBarItem>
fontSize: 14.5,
fontWeight: widget.selected ? FontWeight.w700 : FontWeight.w600,
),
child: Text(widget.destination.label),
child: Text(
widget.destination.label,
maxLines: 1,
overflow: TextOverflow.ellipsis,
),
),
],
),
Expand Down

0 comments on commit 8bf8299

Please sign in to comment.