Skip to content

Commit

Permalink
Merge pull request #582 from micahmo/feature/url-tooltips
Browse files Browse the repository at this point in the history
Show full URLs in tooltip
  • Loading branch information
hjiangsu authored Aug 15, 2023
2 parents c2d7d68 + e937211 commit 1a05547
Showing 1 changed file with 12 additions and 8 deletions.
20 changes: 12 additions & 8 deletions lib/community/widgets/post_card_metadata.dart
Original file line number Diff line number Diff line change
Expand Up @@ -101,15 +101,19 @@ class PostCardMetaData extends StatelessWidget {
if (hostURL != null)
Padding(
padding: const EdgeInsets.only(left: 2.0),
child: IconText(
textScaleFactor: MediaQuery.of(context).textScaleFactor * state.metadataFontSizeScale.textScaleFactor,
icon: Icon(
Icons.public,
size: 15.0,
color: readColor,
child: Tooltip(
message: hostURL,
preferBelow: false,
child: IconText(
textScaleFactor: MediaQuery.of(context).textScaleFactor * state.metadataFontSizeScale.textScaleFactor,
icon: Icon(
Icons.public,
size: 15.0,
color: readColor,
),
text: Uri.parse(hostURL!).host.replaceFirst('www.', ''),
textColor: readColor,
),
text: Uri.parse(hostURL!).host.replaceFirst('www.', ''),
textColor: readColor,
),
),
],
Expand Down

0 comments on commit 1a05547

Please sign in to comment.