mirror of
https://github.com/lifegpc/eh_downloader_flutter.git
synced 2026-06-06 05:49:03 +08:00
feat: 根据设备像素比调整缩略图组件的宽度和高度,改善显示效果
This commit is contained in:
@@ -273,6 +273,7 @@ class _Thumbnail extends State<Thumbnail> {
|
||||
final isLoading = _data == null && _error == null;
|
||||
final isNsfw = widget._pMeta.isNsfw;
|
||||
final i18n = AppLocalizations.of(context)!;
|
||||
final dpr = MediaQuery.of(context).devicePixelRatio;
|
||||
if (isLoading && !_isLoading) _fetchData();
|
||||
_iconSize ??= Theme.of(context).iconTheme.size;
|
||||
String? oUri;
|
||||
@@ -310,8 +311,8 @@ class _Thumbnail extends State<Thumbnail> {
|
||||
child: timg)
|
||||
: timg;
|
||||
return SizedBox(
|
||||
width: widget.width.toDouble(),
|
||||
height: widget.height.toDouble(),
|
||||
width: widget.width * dpr,
|
||||
height: widget.height * dpr,
|
||||
child: isLoading
|
||||
? const Center(child: CircularProgressIndicator())
|
||||
: _data != null
|
||||
|
||||
Reference in New Issue
Block a user