fix(ui): 修正六屏顶栏与内容间距

This commit is contained in:
Zhou Weidong committed 2026-10-19 16:25:25 +08:00
1 parent e03ea76505
commit 2fd92cdbea
11 files changed
+281 -66

No files matched your search

+7 -7
View File
@@ -257,7 +257,7 @@ class _DiscoverPageState extends State<DiscoverPage> {
tooltip: l10n.search,
onTap: logic.openSearch,
),
const SizedBox(width: 7),
const SizedBox(width: 8),
Semantics(
button: true,
label: widget.signedIn ? l10n.myTab : l10n.logIn,
@@ -266,8 +266,8 @@ class _DiscoverPageState extends State<DiscoverPage> {
customBorder: const CircleBorder(),
onTap: widget.signedIn ? widget.onCoins : widget.onSignIn,
child: Container(
width: 28,
height: 28,
width: 36,
height: 36,
decoration: BoxDecoration(
shape: BoxShape.circle,
gradient: const LinearGradient(
@@ -279,7 +279,7 @@ class _DiscoverPageState extends State<DiscoverPage> {
child: const Icon(
Icons.person_rounded,
color: AppColors.onSurface,
size: 15,
size: 18,
),
),
),
@@ -601,8 +601,8 @@ class _HeaderIcon extends StatelessWidget {
@override
Widget build(BuildContext context) {
return SizedBox(
width: 28,
height: 28,
width: 36,
height: 36,
child: IconButton(
tooltip: tooltip,
onPressed: onTap,
@@ -611,7 +611,7 @@ class _HeaderIcon extends StatelessWidget {
backgroundColor: const Color(0xFF2C2D33),
foregroundColor: AppColors.onSurface,
),
icon: Icon(icon, size: 14),
icon: Icon(icon, size: 18),
),
);
}
@@ -435,8 +435,8 @@ class _DramaDetailPageState extends State<DramaDetailPage> {
),
],
child: Container(
width: 28,
height: 28,
width: 36,
height: 36,
decoration: const BoxDecoration(
color: Color(0x80000000),
shape: BoxShape.circle,
@@ -536,8 +536,8 @@ class _RoundAction extends StatelessWidget {
@override
Widget build(BuildContext context) {
return Container(
width: 28,
height: 28,
width: 36,
height: 36,
decoration: const BoxDecoration(
color: Color(0x80000000),
shape: BoxShape.circle,
+57 -32
View File
@@ -185,6 +185,7 @@ class _MyPageState extends State<MyPage> {
),
const Spacer(),
_RoundHeaderButton(
key: const Key('mine-search-button'),
tooltip: l10n.search,
icon: Icons.search_rounded,
onTap: () => logic.act(
@@ -194,10 +195,11 @@ class _MyPageState extends State<MyPage> {
onAction: widget.onAction,
),
),
const SizedBox(width: 7),
const SizedBox(width: 8),
Container(
width: 28,
height: 28,
key: const Key('mine-avatar'),
width: 36,
height: 36,
decoration: const BoxDecoration(
shape: BoxShape.circle,
gradient: LinearGradient(
@@ -209,7 +211,7 @@ class _MyPageState extends State<MyPage> {
child: const Icon(
Icons.person_rounded,
color: AppColors.onSurface,
size: 15,
size: 18,
),
),
],
@@ -455,37 +457,59 @@ class _MyPageState extends State<MyPage> {
return Column(
crossAxisAlignment: CrossAxisAlignment.start,
children: [
Row(
children: [
for (var index = 0; index < tabs.length; index++)
Expanded(
child: Semantics(
selected: logic.section == index,
button: true,
child: InkWell(
key: Key('mine-library-tab-$index'),
onTap: () => logic.selectSection(index),
child: Padding(
padding: const EdgeInsets.symmetric(vertical: 4),
child: Text(
tabs[index],
maxLines: 1,
overflow: TextOverflow.ellipsis,
style: TextStyle(
color: logic.section == index
? AppColors.blue
: const Color(0xFFE4DBDD),
fontSize: 14,
fontWeight: FontWeight.w800,
SingleChildScrollView(
scrollDirection: Axis.horizontal,
child: Row(
children: [
for (var index = 0; index < tabs.length; index++)
Padding(
padding: EdgeInsets.only(
right: index == tabs.length - 1 ? 0 : 20,
),
child: Semantics(
selected: logic.section == index,
button: true,
child: InkWell(
key: Key('mine-library-tab-$index'),
onTap: () => logic.selectSection(index),
child: Padding(
padding: const EdgeInsets.symmetric(vertical: 6),
child: Column(
mainAxisSize: MainAxisSize.min,
children: [
Text(
tabs[index],
maxLines: 1,
style: TextStyle(
color: logic.section == index
? AppColors.blue
: const Color(0xFFE4DBDD),
fontSize: 14,
fontWeight: FontWeight.w800,
),
),
const SizedBox(height: 4),
AnimatedContainer(
duration: const Duration(milliseconds: 160),
width: 18,
height: 2,
decoration: BoxDecoration(
color: logic.section == index
? AppColors.blue
: Colors.transparent,
borderRadius: BorderRadius.circular(1),
),
),
],
),
),
),
),
),
),
],
],
),
),
const SizedBox(height: 10),
const SizedBox(height: 12),
if (logic.section == 1 && context.watch<FavoriteController>().loading)
const Center(
child: Padding(
@@ -935,6 +959,7 @@ class _MyPageState extends State<MyPage> {
class _RoundHeaderButton extends StatelessWidget {
const _RoundHeaderButton({
super.key,
required this.tooltip,
required this.icon,
required this.onTap,
@@ -947,8 +972,8 @@ class _RoundHeaderButton extends StatelessWidget {
@override
Widget build(BuildContext context) {
return SizedBox(
width: 28,
height: 28,
width: 36,
height: 36,
child: IconButton(
tooltip: tooltip,
onPressed: onTap,
@@ -957,7 +982,7 @@ class _RoundHeaderButton extends StatelessWidget {
backgroundColor: const Color(0xFF2C2D33),
foregroundColor: AppColors.onSurface,
),
icon: Icon(icon, size: 14),
icon: Icon(icon, size: 18),
),
);
}
+4 -4
View File
@@ -803,7 +803,7 @@ class _PlaybackOverlayState extends State<_PlaybackOverlay> {
onPressed: () => _run(widget.onBack!),
)
else
const SizedBox(width: 28),
const SizedBox(width: 36),
const SizedBox(width: 8),
Expanded(
child: Text(
@@ -926,8 +926,8 @@ class _TopAction extends StatelessWidget {
@override
Widget build(BuildContext context) {
return SizedBox(
width: 28,
height: 28,
width: 36,
height: 36,
child: IconButton(
tooltip: tooltip,
onPressed: onPressed,
@@ -936,7 +936,7 @@ class _TopAction extends StatelessWidget {
backgroundColor: const Color(0xFF2C2D33),
foregroundColor: AppColors.onSurface,
),
icon: Icon(icon, size: 15),
icon: Icon(icon, size: 18),
),
);
}
@@ -95,7 +95,7 @@ class HomeFeedOverlay extends StatelessWidget {
icon: Icons.search_rounded,
onPressed: onSearch,
),
const SizedBox(width: 6),
const SizedBox(width: 8),
_RoundIcon(
key: const Key('home-feed-more'),
tooltip: l10n.more,
@@ -147,7 +147,7 @@ class HomeFeedOverlay extends StatelessWidget {
key: const Key('home-feed-info-card'),
radius: 14,
blur: 6,
padding: const EdgeInsets.fromLTRB(12, 11, 12, 11),
padding: const EdgeInsets.all(12),
gradient: const LinearGradient(
begin: Alignment.topLeft,
end: Alignment.bottomRight,
@@ -180,7 +180,7 @@ class HomeFeedOverlay extends StatelessWidget {
],
),
),
const SizedBox(width: 6),
const SizedBox(width: 8),
Flexible(
child: Text(
l10n.episodeOfTotal(episode.number, drama.episodeCount),
@@ -193,9 +193,11 @@ class HomeFeedOverlay extends StatelessWidget {
),
],
),
const SizedBox(height: 7),
const SizedBox(height: 8),
Text(
localizedEpisodeTitle(l10n, episode.number),
episode.title.trim().isEmpty
? localizedDramaTitle(l10n, drama)
: episode.title,
key: const Key('home-feed-episode-title'),
maxLines: 1,
overflow: TextOverflow.ellipsis,
@@ -352,8 +354,8 @@ class _RoundIcon extends StatelessWidget {
@override
Widget build(BuildContext context) {
return SizedBox(
width: 28,
height: 28,
width: 36,
height: 36,
child: IconButton(
tooltip: tooltip,
onPressed: onPressed,
@@ -362,7 +364,7 @@ class _RoundIcon extends StatelessWidget {
backgroundColor: const Color(0xCC2C2D33),
foregroundColor: AppColors.onSurface,
),
icon: Icon(icon, size: 14),
icon: Icon(icon, size: 18),
),
);
}