opt: emote panel

Signed-off-by: bggRGjQaUbCoE <githubaccount56556@proton.me>
This commit is contained in:
bggRGjQaUbCoE
2025-04-30 12:03:47 +08:00
parent 15f4ae2567
commit 77e4a30bc5
3 changed files with 101 additions and 108 deletions

View File

@@ -42,9 +42,9 @@ class _EmotePanelState extends State<EmotePanel>
(e) {
int size = e.emote!.first.meta!.size!;
int type = e.type!;
return Padding(
padding: const EdgeInsets.fromLTRB(12, 6, 12, 0),
child: GridView.builder(
return GridView.builder(
padding: const EdgeInsets.only(
left: 12, right: 12, bottom: 12),
gridDelegate:
SliverGridDelegateWithMaxCrossAxisExtent(
maxCrossAxisExtent:
@@ -76,8 +76,7 @@ class _EmotePanelState extends State<EmotePanel>
src: e.emote![index].url!,
width: size * 38,
height: size * 38,
semanticsLabel:
e.emote![index].text!,
semanticsLabel: e.emote![index].text!,
type: 'emote',
boxFit: BoxFit.contain,
),
@@ -85,7 +84,6 @@ class _EmotePanelState extends State<EmotePanel>
),
);
},
),
);
},
).toList(),

View File

@@ -60,9 +60,9 @@ class _LiveEmotePanelState extends State<LiveEmotePanel>
max(1, item.emoticons!.first.width! / 80);
double heightFac =
max(1, item.emoticons!.first.height! / 80);
return Padding(
padding: const EdgeInsets.fromLTRB(12, 6, 12, 0),
child: GridView.builder(
return GridView.builder(
padding: const EdgeInsets.only(
left: 12, right: 12, bottom: 12),
gridDelegate:
SliverGridDelegateWithMaxCrossAxisExtent(
maxCrossAxisExtent: widthFac * 40,
@@ -99,7 +99,6 @@ class _LiveEmotePanelState extends State<LiveEmotePanel>
),
);
},
),
);
},
).toList(),

View File

@@ -39,10 +39,7 @@ class ReplyPage extends CommonPublishPage {
class _ReplyPageState extends CommonPublishPageState<ReplyPage> {
final RxBool _syncToDynamic = false.obs;
Widget get child => MediaQuery.removePadding(
removeTop: true,
context: context,
child: GestureDetector(
Widget get child => GestureDetector(
onTap: Get.back,
child: LayoutBuilder(
builder: (context, constraints) {
@@ -68,7 +65,6 @@ class _ReplyPageState extends CommonPublishPageState<ReplyPage> {
);
},
),
),
);
@override