fix: Design glitches in sticker dialog
This commit is contained in:
parent
cf6b34f8c0
commit
b63a1d3e5c
1 changed files with 25 additions and 20 deletions
|
|
@ -73,26 +73,29 @@ class StickerPickerDialogState extends State<StickerPickerDialog> {
|
|||
physics: const NeverScrollableScrollPhysics(),
|
||||
itemBuilder: (BuildContext context, int imageIndex) {
|
||||
final image = pack.images[imageKeys[imageIndex]]!;
|
||||
return InkWell(
|
||||
radius: AppConfig.borderRadius,
|
||||
key: ValueKey(image.url.toString()),
|
||||
onTap: () {
|
||||
// copy the image
|
||||
final imageCopy =
|
||||
ImagePackImageContent.fromJson(image.toJson().copy());
|
||||
// set the body, if it doesn't exist, to the key
|
||||
imageCopy.body ??= imageKeys[imageIndex];
|
||||
widget.onSelected(imageCopy);
|
||||
},
|
||||
child: AbsorbPointer(
|
||||
absorbing: true,
|
||||
child: MxcImage(
|
||||
uri: image.url,
|
||||
fit: BoxFit.contain,
|
||||
width: 128,
|
||||
height: 128,
|
||||
animated: true,
|
||||
isThumbnail: false,
|
||||
return Tooltip(
|
||||
message: image.body ?? imageKeys[imageIndex],
|
||||
child: InkWell(
|
||||
radius: AppConfig.borderRadius,
|
||||
key: ValueKey(image.url.toString()),
|
||||
onTap: () {
|
||||
// copy the image
|
||||
final imageCopy =
|
||||
ImagePackImageContent.fromJson(image.toJson().copy());
|
||||
// set the body, if it doesn't exist, to the key
|
||||
imageCopy.body ??= imageKeys[imageIndex];
|
||||
widget.onSelected(imageCopy);
|
||||
},
|
||||
child: AbsorbPointer(
|
||||
absorbing: true,
|
||||
child: MxcImage(
|
||||
uri: image.url,
|
||||
fit: BoxFit.contain,
|
||||
width: 128,
|
||||
height: 128,
|
||||
animated: true,
|
||||
isThumbnail: false,
|
||||
),
|
||||
),
|
||||
),
|
||||
);
|
||||
|
|
@ -111,6 +114,7 @@ class StickerPickerDialogState extends State<StickerPickerDialog> {
|
|||
SliverAppBar(
|
||||
floating: true,
|
||||
pinned: true,
|
||||
scrolledUnderElevation: 0,
|
||||
automaticallyImplyLeading: false,
|
||||
backgroundColor: Colors.transparent,
|
||||
title: SizedBox(
|
||||
|
|
@ -118,6 +122,7 @@ class StickerPickerDialogState extends State<StickerPickerDialog> {
|
|||
child: TextField(
|
||||
autofocus: false,
|
||||
decoration: InputDecoration(
|
||||
filled: true,
|
||||
hintText: L10n.of(context).search,
|
||||
prefixIcon: const Icon(Icons.search_outlined),
|
||||
contentPadding: EdgeInsets.zero,
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue