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)
|
||||
],
|
||||
Text(
|
||||
'第' +
|
||||
(widget.pages[i].title ?? "${i + 1}") +
|
||||
'话',
|
||||
Expanded(
|
||||
child: Text(
|
||||
widget.pages[i].title ?? '第${i + 1}话',
|
||||
maxLines: (widget.pages[i].longTitle != null &&
|
||||
widget.pages[i].longTitle != '')
|
||||
? 1
|
||||
: 2,
|
||||
style: TextStyle(
|
||||
fontSize: 13,
|
||||
color: i == currentIndex
|
||||
@@ -195,7 +198,7 @@ class _BangumiPanelState extends State<BangumiPanel> {
|
||||
: Theme.of(context)
|
||||
.colorScheme
|
||||
.onSurface),
|
||||
),
|
||||
)),
|
||||
const SizedBox(width: 2),
|
||||
if (widget.pages[i].badge != null) ...[
|
||||
const Spacer(),
|
||||
@@ -219,6 +222,8 @@ class _BangumiPanelState extends State<BangumiPanel> {
|
||||
]
|
||||
],
|
||||
),
|
||||
if (widget.pages[i].longTitle != null &&
|
||||
widget.pages[i].longTitle != '') ...[
|
||||
const SizedBox(height: 3),
|
||||
Text(
|
||||
widget.pages[i].longTitle!,
|
||||
@@ -227,9 +232,12 @@ class _BangumiPanelState extends State<BangumiPanel> {
|
||||
fontSize: 13,
|
||||
color: i == currentIndex
|
||||
? Theme.of(context).colorScheme.primary
|
||||
: Theme.of(context).colorScheme.onSurface),
|
||||
: Theme.of(context)
|
||||
.colorScheme
|
||||
.onSurface),
|
||||
overflow: TextOverflow.ellipsis,
|
||||
)
|
||||
]
|
||||
],
|
||||
),
|
||||
),
|
||||
|
||||
Reference in New Issue
Block a user