Skip to content

Commit

Permalink
use default line height for messages font
Browse files Browse the repository at this point in the history
  • Loading branch information
boxdot committed Jan 27, 2025
1 parent 1bb2b11 commit 3882d18
Show file tree
Hide file tree
Showing 3 changed files with 19 additions and 9 deletions.
7 changes: 7 additions & 0 deletions .github/workflows/flutter_test.yml
Original file line number Diff line number Diff line change
Expand Up @@ -52,3 +52,10 @@ jobs:

- name: Run Flutter tests
run: just test-flutter

- name: Upload golden failures
if: failure()
uses: actions/upload-artifact@v4
with:
name: golden-failures
path: app/test/**/failures/*
13 changes: 6 additions & 7 deletions app/lib/message_list/text_message_tile.dart
Original file line number Diff line number Diff line change
Expand Up @@ -58,9 +58,8 @@ class TextMessageTile extends StatelessWidget {
flex: 5,
child: Container(
padding: EdgeInsets.only(
top: flightPosition.isFirst ? 5 : 0,
bottom: flightPosition.isLast ? 5 : 0,
),
top: flightPosition.isFirst ? 5 : 0,
bottom: flightPosition.isLast ? 5 : 0),
child: Column(
crossAxisAlignment:
isSender ? CrossAxisAlignment.end : CrossAxisAlignment.start,
Expand Down Expand Up @@ -136,10 +135,10 @@ class TextMessageTile extends StatelessWidget {
: AlignmentDirectional.topStart,
child: Container(
padding: EdgeInsets.only(
top: 4,
right: 11,
left: 11,
bottom: 6,
top: isLargeScreen(context) ? 1 : 4,
right: isLargeScreen(context) ? 10 : 11,
left: isLargeScreen(context) ? 10 : 11,
bottom: isLargeScreen(context) ? 5 : 6,
),
decoration: BoxDecoration(
borderRadius: BorderRadius.circular(7),
Expand Down
8 changes: 6 additions & 2 deletions app/lib/theme/styles.dart
Original file line number Diff line number Diff line change
Expand Up @@ -112,9 +112,13 @@ InputDecoration messageComposerInputDecoration(BuildContext context) =>
TextStyle messageTextStyle(BuildContext context, bool inverted) => TextStyle(
color: inverted ? Colors.white : Colors.black,
fontFamily: fontFamily,
fontVariations: variationMedium,
fontVariations:
isLargeScreen(context) ? variationRegular : variationMedium,
letterSpacing: -0.05,
fontSize: 15,
fontSize: isLargeScreen(context) ? 14 : 15,
// NOTE: When specifying line height, the text is rendered inconsistently on
// Linux and macOS (and therefore also on Android and iOS). For now, we use the default one.
// height: isLargeScreen(context) ? 1.5 : 1.3,
);

final textInputBorder = OutlineInputBorder(
Expand Down

0 comments on commit 3882d18

Please sign in to comment.