mirror of
https://github.com/HChaZZY/PiliPlus.git
synced 2025-12-06 09:13:48 +08:00
opt: video title
Closes #799 Signed-off-by: bggRGjQaUbCoE <githubaccount56556@proton.me>
This commit is contained in:
@@ -1929,10 +1929,16 @@ class HeaderControlState extends State<HeaderControl> {
|
|||||||
builder: (context, constraints) {
|
builder: (context, constraints) {
|
||||||
return Obx(
|
return Obx(
|
||||||
() {
|
() {
|
||||||
|
String title = videoIntroController
|
||||||
|
.videoDetail.value.pages
|
||||||
|
?.firstWhereOrNull((e) =>
|
||||||
|
e.cid == videoDetailCtr.cid.value)
|
||||||
|
?.pagePart ??
|
||||||
|
videoIntroController
|
||||||
|
.videoDetail.value.title!;
|
||||||
final textPainter = TextPainter(
|
final textPainter = TextPainter(
|
||||||
text: TextSpan(
|
text: TextSpan(
|
||||||
text: videoIntroController
|
text: title,
|
||||||
.videoDetail.value.title!,
|
|
||||||
style: const TextStyle(
|
style: const TextStyle(
|
||||||
color: Colors.white,
|
color: Colors.white,
|
||||||
fontSize: 16,
|
fontSize: 16,
|
||||||
@@ -1945,8 +1951,7 @@ class HeaderControlState extends State<HeaderControl> {
|
|||||||
return ConstrainedBox(
|
return ConstrainedBox(
|
||||||
constraints: BoxConstraints(maxHeight: 25),
|
constraints: BoxConstraints(maxHeight: 25),
|
||||||
child: Marquee(
|
child: Marquee(
|
||||||
text: videoIntroController
|
text: title,
|
||||||
.videoDetail.value.title!,
|
|
||||||
style: const TextStyle(
|
style: const TextStyle(
|
||||||
color: Colors.white,
|
color: Colors.white,
|
||||||
fontSize: 16,
|
fontSize: 16,
|
||||||
@@ -1972,8 +1977,7 @@ class HeaderControlState extends State<HeaderControl> {
|
|||||||
);
|
);
|
||||||
} else {
|
} else {
|
||||||
return Text(
|
return Text(
|
||||||
videoIntroController
|
title,
|
||||||
.videoDetail.value.title!,
|
|
||||||
style: const TextStyle(
|
style: const TextStyle(
|
||||||
color: Colors.white,
|
color: Colors.white,
|
||||||
fontSize: 16,
|
fontSize: 16,
|
||||||
|
|||||||
Reference in New Issue
Block a user