mirror of
https://github.com/HChaZZY/PiliPlus.git
synced 2025-12-06 09:13:48 +08:00
fix: 操作按钮尺寸错误
This commit is contained in:
@@ -395,12 +395,8 @@ class _BangumiInfoState extends State<BangumiInfo> {
|
|||||||
padding: const EdgeInsets.only(top: 1),
|
padding: const EdgeInsets.only(top: 1),
|
||||||
child: SizedBox(
|
child: SizedBox(
|
||||||
height: 48,
|
height: 48,
|
||||||
child: GridView.count(
|
child: Row(
|
||||||
physics: const NeverScrollableScrollPhysics(),
|
mainAxisAlignment: MainAxisAlignment.spaceAround,
|
||||||
primary: false,
|
|
||||||
padding: EdgeInsets.zero,
|
|
||||||
crossAxisCount: 5,
|
|
||||||
childAspectRatio: 1.25,
|
|
||||||
children: <Widget>[
|
children: <Widget>[
|
||||||
Obx(() => ActionItem(
|
Obx(() => ActionItem(
|
||||||
icon: const Icon(FontAwesomeIcons.thumbsUp),
|
icon: const Icon(FontAwesomeIcons.thumbsUp),
|
||||||
|
|||||||
@@ -493,12 +493,8 @@ class _VideoInfoState extends State<VideoInfo> with TickerProviderStateMixin {
|
|||||||
return Container(
|
return Container(
|
||||||
margin: const EdgeInsets.only(top: 1),
|
margin: const EdgeInsets.only(top: 1),
|
||||||
height: 48,
|
height: 48,
|
||||||
child: GridView.count(
|
child: Row(
|
||||||
physics: const NeverScrollableScrollPhysics(),
|
mainAxisAlignment: MainAxisAlignment.spaceAround,
|
||||||
primary: false,
|
|
||||||
padding: EdgeInsets.zero,
|
|
||||||
crossAxisCount: 5,
|
|
||||||
childAspectRatio: 1.25,
|
|
||||||
children: <Widget>[
|
children: <Widget>[
|
||||||
Obx(
|
Obx(
|
||||||
() => ActionItem(
|
() => ActionItem(
|
||||||
|
|||||||
@@ -26,54 +26,56 @@ class ActionItem extends StatelessWidget {
|
|||||||
|
|
||||||
@override
|
@override
|
||||||
Widget build(BuildContext context) {
|
Widget build(BuildContext context) {
|
||||||
return Semantics(
|
return Expanded(
|
||||||
label: (text ?? "") + (selectStatus ? "已" :"") + semanticsLabel,
|
child: Semantics(
|
||||||
child:
|
label: (text ?? "") + (selectStatus ? "已" : "") + semanticsLabel,
|
||||||
InkWell(
|
child: InkWell(
|
||||||
onTap: () => {
|
onTap: () => {
|
||||||
feedBack(),
|
feedBack(),
|
||||||
onTap!(),
|
onTap!(),
|
||||||
},
|
|
||||||
onLongPress: () => {
|
|
||||||
if (onLongPress != null) {onLongPress!()}
|
|
||||||
},
|
|
||||||
borderRadius: StyleString.mdRadius,
|
|
||||||
child: Column(
|
|
||||||
mainAxisAlignment: MainAxisAlignment.center,
|
|
||||||
children: [
|
|
||||||
// const SizedBox(height: 2),
|
|
||||||
Icon(
|
|
||||||
selectStatus
|
|
||||||
? selectIcon!.icon!
|
|
||||||
: icon!.icon!,
|
|
||||||
size: 18,
|
|
||||||
color: selectStatus
|
|
||||||
? Theme.of(context).colorScheme.primary
|
|
||||||
: Theme.of(context).colorScheme.outline,
|
|
||||||
),
|
|
||||||
const SizedBox(height: 3),
|
|
||||||
AnimatedOpacity(
|
|
||||||
opacity: loadingStatus! ? 0 : 1,
|
|
||||||
duration: const Duration(milliseconds: 200),
|
|
||||||
child: AnimatedSwitcher(
|
|
||||||
duration: const Duration(milliseconds: 300),
|
|
||||||
transitionBuilder: (Widget child, Animation<double> animation) {
|
|
||||||
return ScaleTransition(scale: animation, child: child);
|
|
||||||
},
|
},
|
||||||
child: Text(
|
onLongPress: () => {
|
||||||
text ?? '',
|
if (onLongPress != null) {onLongPress!()}
|
||||||
key: ValueKey<String>(text ?? ''),
|
},
|
||||||
style: TextStyle(
|
// borderRadius: StyleString.mdRadius,
|
||||||
|
child: Column(
|
||||||
|
mainAxisAlignment: MainAxisAlignment.center,
|
||||||
|
children: [
|
||||||
|
// const SizedBox(height: 2),
|
||||||
|
Icon(
|
||||||
|
selectStatus ? selectIcon!.icon! : icon!.icon!,
|
||||||
|
size: 18,
|
||||||
color: selectStatus
|
color: selectStatus
|
||||||
? Theme.of(context).colorScheme.primary
|
? Theme.of(context).colorScheme.primary
|
||||||
: Theme.of(context).colorScheme.outline,
|
: Theme.of(context).colorScheme.outline,
|
||||||
fontSize: Theme.of(context).textTheme.labelSmall!.fontSize),
|
),
|
||||||
semanticsLabel: "",
|
const SizedBox(height: 3),
|
||||||
|
AnimatedOpacity(
|
||||||
|
opacity: loadingStatus! ? 0 : 1,
|
||||||
|
duration: const Duration(milliseconds: 200),
|
||||||
|
child: AnimatedSwitcher(
|
||||||
|
duration: const Duration(milliseconds: 300),
|
||||||
|
transitionBuilder:
|
||||||
|
(Widget child, Animation<double> animation) {
|
||||||
|
return ScaleTransition(scale: animation, child: child);
|
||||||
|
},
|
||||||
|
child: Text(
|
||||||
|
text ?? '',
|
||||||
|
key: ValueKey<String>(text ?? ''),
|
||||||
|
style: TextStyle(
|
||||||
|
color: selectStatus
|
||||||
|
? Theme.of(context).colorScheme.primary
|
||||||
|
: Theme.of(context).colorScheme.outline,
|
||||||
|
fontSize: Theme.of(context)
|
||||||
|
.textTheme
|
||||||
|
.labelSmall!
|
||||||
|
.fontSize),
|
||||||
|
semanticsLabel: "",
|
||||||
|
),
|
||||||
|
),
|
||||||
|
),
|
||||||
|
],
|
||||||
),
|
),
|
||||||
),
|
)));
|
||||||
),
|
|
||||||
],
|
|
||||||
),
|
|
||||||
));
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user