From 2e8ea280dc16c8aa90bb37c708185f5215c15543 Mon Sep 17 00:00:00 2001 From: lifegpc Date: Sat, 9 Sep 2023 15:12:10 +0800 Subject: [PATCH] reduce iconsize if width is too small --- lib/components/thumbnail.dart | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/lib/components/thumbnail.dart b/lib/components/thumbnail.dart index b67c330..897ac23 100644 --- a/lib/components/thumbnail.dart +++ b/lib/components/thumbnail.dart @@ -157,14 +157,16 @@ class _Thumbnail extends State { final isLoading = _data == null && _error == null; final isNsfw = widget._pMeta.isNsfw; if (isLoading && !_isLoading) _fetchData(); - final iconSize = Theme.of(context).iconTheme.size; + final iconSize = MediaQuery.of(context).size.width < 400 + ? 14.0 + : Theme.of(context).iconTheme.size; final moreVertMenu = Positioned( right: 0, top: 0, width: iconSize, height: iconSize, child: PopupMenuButton( - icon: const Icon(Icons.more_vert), + child: Icon(Icons.more_vert, size: iconSize), onSelected: (v) { onItemSelected(v); },