opt: video title

Closes #799

Signed-off-by: bggRGjQaUbCoE <githubaccount56556@proton.me>
This commit is contained in:
bggRGjQaUbCoE
2025-05-03 13:37:51 +08:00
parent 974a74a3c7
commit 57fa8b4f3e

View File

@@ -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,