mirror of
https://github.com/HChaZZY/PiliPlus.git
synced 2025-12-21 09:37:02 +08:00
opt ui
Closes #1050 Signed-off-by: bggRGjQaUbCoE <githubaccount56556@proton.me>
This commit is contained in:
@@ -27,6 +27,7 @@ class PgcIntroPage extends StatefulWidget {
|
||||
final Function showEpisodes;
|
||||
final Function showIntroDetail;
|
||||
final double maxWidth;
|
||||
final bool isLandscape;
|
||||
|
||||
const PgcIntroPage({
|
||||
super.key,
|
||||
@@ -35,6 +36,7 @@ class PgcIntroPage extends StatefulWidget {
|
||||
required this.showEpisodes,
|
||||
required this.showIntroDetail,
|
||||
required this.maxWidth,
|
||||
required this.isLandscape,
|
||||
});
|
||||
|
||||
@override
|
||||
@@ -62,7 +64,7 @@ class _PgcIntroPageState extends TripleState<PgcIntroPage>
|
||||
super.build(context);
|
||||
final ThemeData theme = Theme.of(context);
|
||||
final item = introController.pgcItem;
|
||||
final isLandscape = context.isLandscape;
|
||||
final isLandscape = widget.isLandscape;
|
||||
Widget sliver = SliverToBoxAdapter(
|
||||
child: Column(
|
||||
crossAxisAlignment: CrossAxisAlignment.start,
|
||||
|
||||
@@ -105,7 +105,7 @@ class _IntroDetailState extends CommonCollapseSlidePageState<PgcIntroPanel> {
|
||||
left: 14,
|
||||
right: 14,
|
||||
top: 14,
|
||||
bottom: MediaQuery.paddingOf(context).bottom + 80,
|
||||
bottom: MediaQuery.viewPaddingOf(context).bottom + 100,
|
||||
),
|
||||
children: [
|
||||
Text(
|
||||
|
||||
@@ -109,8 +109,8 @@ class _PgcPanelState extends State<PgcPanel> {
|
||||
SizedBox(
|
||||
height: 34,
|
||||
child: TextButton(
|
||||
style: ButtonStyle(
|
||||
padding: WidgetStateProperty.all(EdgeInsets.zero),
|
||||
style: const ButtonStyle(
|
||||
padding: WidgetStatePropertyAll(EdgeInsets.zero),
|
||||
),
|
||||
onPressed: () => widget.showEpisodes(
|
||||
null,
|
||||
@@ -134,13 +134,13 @@ class _PgcPanelState extends State<PgcPanel> {
|
||||
SizedBox(
|
||||
height: 60,
|
||||
child: ListView.builder(
|
||||
padding: EdgeInsets.zero,
|
||||
controller: listViewScrollCtr,
|
||||
scrollDirection: Axis.horizontal,
|
||||
itemCount: widget.pages.length,
|
||||
itemExtent: 150,
|
||||
itemBuilder: (BuildContext context, int index) {
|
||||
return _buildItem(theme, isPugv, index);
|
||||
},
|
||||
itemBuilder: (BuildContext context, int index) =>
|
||||
_buildItem(theme, isPugv, index),
|
||||
),
|
||||
),
|
||||
],
|
||||
|
||||
@@ -17,7 +17,6 @@ import 'package:PiliPlus/pages/video/introduction/ugc/widgets/page.dart';
|
||||
import 'package:PiliPlus/pages/video/introduction/ugc/widgets/season.dart';
|
||||
import 'package:PiliPlus/pages/video/introduction/ugc/widgets/triple_state.dart';
|
||||
import 'package:PiliPlus/utils/app_scheme.dart';
|
||||
import 'package:PiliPlus/utils/context_ext.dart';
|
||||
import 'package:PiliPlus/utils/date_util.dart';
|
||||
import 'package:PiliPlus/utils/extension.dart';
|
||||
import 'package:PiliPlus/utils/feed_back.dart';
|
||||
@@ -41,12 +40,14 @@ class UgcIntroPanel extends StatefulWidget {
|
||||
required this.showAiBottomSheet,
|
||||
required this.showEpisodes,
|
||||
required this.onShowMemberPage,
|
||||
required this.isPortrait,
|
||||
required this.isHorizontal,
|
||||
});
|
||||
final String heroTag;
|
||||
final Function showAiBottomSheet;
|
||||
final Function showEpisodes;
|
||||
final ValueChanged<int?> onShowMemberPage;
|
||||
final bool isPortrait;
|
||||
final bool isHorizontal;
|
||||
|
||||
@override
|
||||
@@ -77,7 +78,7 @@ class _UgcIntroPanelState extends TripleState<UgcIntroPanel>
|
||||
fadeCurve: Curves.ease,
|
||||
sizeCurve: Curves.linear,
|
||||
);
|
||||
final isPortrait = context.isPortrait;
|
||||
final isPortrait = widget.isPortrait;
|
||||
final isHorizontal = !isPortrait && widget.isHorizontal;
|
||||
return SliverPadding(
|
||||
padding: const EdgeInsets.only(
|
||||
|
||||
@@ -113,8 +113,8 @@ class _PagesPanelState extends State<PagesPanel> {
|
||||
SizedBox(
|
||||
height: 34,
|
||||
child: TextButton(
|
||||
style: ButtonStyle(
|
||||
padding: WidgetStateProperty.all(EdgeInsets.zero),
|
||||
style: const ButtonStyle(
|
||||
padding: WidgetStatePropertyAll(EdgeInsets.zero),
|
||||
),
|
||||
onPressed: () => widget.showEpisodes!(
|
||||
null,
|
||||
|
||||
Reference in New Issue
Block a user