mirror of
https://github.com/HChaZZY/PiliPlus.git
synced 2025-12-06 09:13:48 +08:00
mod: 番剧标题溢出以及没有长标题时显示调整
This commit is contained in:
@@ -184,10 +184,13 @@ class _BangumiPanelState extends State<BangumiPanel> {
|
|||||||
),
|
),
|
||||||
const SizedBox(width: 6)
|
const SizedBox(width: 6)
|
||||||
],
|
],
|
||||||
Text(
|
Expanded(
|
||||||
'第' +
|
child: Text(
|
||||||
(widget.pages[i].title ?? "${i + 1}") +
|
widget.pages[i].title ?? '第${i + 1}话',
|
||||||
'话',
|
maxLines: (widget.pages[i].longTitle != null &&
|
||||||
|
widget.pages[i].longTitle != '')
|
||||||
|
? 1
|
||||||
|
: 2,
|
||||||
style: TextStyle(
|
style: TextStyle(
|
||||||
fontSize: 13,
|
fontSize: 13,
|
||||||
color: i == currentIndex
|
color: i == currentIndex
|
||||||
@@ -195,7 +198,7 @@ class _BangumiPanelState extends State<BangumiPanel> {
|
|||||||
: Theme.of(context)
|
: Theme.of(context)
|
||||||
.colorScheme
|
.colorScheme
|
||||||
.onSurface),
|
.onSurface),
|
||||||
),
|
)),
|
||||||
const SizedBox(width: 2),
|
const SizedBox(width: 2),
|
||||||
if (widget.pages[i].badge != null) ...[
|
if (widget.pages[i].badge != null) ...[
|
||||||
const Spacer(),
|
const Spacer(),
|
||||||
@@ -219,17 +222,22 @@ class _BangumiPanelState extends State<BangumiPanel> {
|
|||||||
]
|
]
|
||||||
],
|
],
|
||||||
),
|
),
|
||||||
const SizedBox(height: 3),
|
if (widget.pages[i].longTitle != null &&
|
||||||
Text(
|
widget.pages[i].longTitle != '') ...[
|
||||||
widget.pages[i].longTitle!,
|
const SizedBox(height: 3),
|
||||||
maxLines: 1,
|
Text(
|
||||||
style: TextStyle(
|
widget.pages[i].longTitle!,
|
||||||
fontSize: 13,
|
maxLines: 1,
|
||||||
color: i == currentIndex
|
style: TextStyle(
|
||||||
? Theme.of(context).colorScheme.primary
|
fontSize: 13,
|
||||||
: Theme.of(context).colorScheme.onSurface),
|
color: i == currentIndex
|
||||||
overflow: TextOverflow.ellipsis,
|
? Theme.of(context).colorScheme.primary
|
||||||
)
|
: Theme.of(context)
|
||||||
|
.colorScheme
|
||||||
|
.onSurface),
|
||||||
|
overflow: TextOverflow.ellipsis,
|
||||||
|
)
|
||||||
|
]
|
||||||
],
|
],
|
||||||
),
|
),
|
||||||
),
|
),
|
||||||
|
|||||||
Reference in New Issue
Block a user