Skip to content

Commit

Permalink
Fixing Pali Word fonts & share
Browse files Browse the repository at this point in the history
* fonts are now serif
* share is now sort of shaped like the card (albeit still text-only)
  • Loading branch information
deobald committed Aug 10, 2022
1 parent c5ca556 commit 8bc07b9
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 6 deletions.
6 changes: 3 additions & 3 deletions lib/app/style.dart
Original file line number Diff line number Diff line change
Expand Up @@ -14,11 +14,11 @@ sanSerifFont({BuildContext? context, double? fontSize, Color? color, TextStyle?
color: color ?? getColor(context)));
}

serifFont({BuildContext? context, TextStyle? textStyle}) {
serifFont({BuildContext? context, double? fontSize, Color? color, TextStyle? textStyle}) {
return GoogleFonts.getFont('Gentium Book Basic', textStyle: TextStyle(
inherit: true,
fontSize: textStyle?.fontSize ?? 18.0,
fontSize: fontSize ?? textStyle?.fontSize ?? 18.0,
fontWeight: FontWeight.normal,
fontStyle: textStyle?.fontStyle ?? FontStyle.normal,
color: getColor(context)));
color: color ?? getColor(context)));
}
6 changes: 3 additions & 3 deletions lib/ui/widgets/cards/PaliWordCard.dart
Original file line number Diff line number Diff line change
Expand Up @@ -71,7 +71,7 @@ class PaliWordCard extends StatelessWidget {
),
child: Text(
data.pali ?? "<pali text was empty>",
style: sanSerifFont(context: context, fontSize: 18.0, color: Theme.of(context).colorScheme.onSurface)
style: serifFont(context: context, fontSize: 18.0, color: Theme.of(context).colorScheme.onSurface)
),
)
),
Expand All @@ -95,7 +95,7 @@ class PaliWordCard extends StatelessWidget {
padding: const EdgeInsets.fromLTRB(12.0, 0.0, 12.0, 12.0),
child: Text(
data.translation ?? "<translation was empty>",
style: sanSerifFont(context: context, fontSize: 18.0, color: Theme.of(context).colorScheme.onSurface)
style: serifFont(context: context, fontSize: 18.0, color: Theme.of(context).colorScheme.onSurface)
),
)
)
Expand All @@ -117,7 +117,7 @@ class PaliWordCard extends StatelessWidget {
await WcFlutterShare.share(
sharePopupTitle: AppStrings.get().labelSharePaliWord,
mimeType: 'text/plain',
text: '${data.header}: ${data.pali}\n${AppStrings.get().labelTranslation}: ${data.translation}',
text: '${data.header}: \n${data.pali}\n\n${AppStrings.get().labelTranslation}: \n${data.translation}',
);
},
));
Expand Down

0 comments on commit 8bc07b9

Please sign in to comment.