opt desktop pip

Signed-off-by: bggRGjQaUbCoE <githubaccount56556@proton.me>
This commit is contained in:
bggRGjQaUbCoE
2025-12-14 12:20:20 +08:00
parent 2bc3275c1f
commit 02bd68f697
4 changed files with 61 additions and 12 deletions

View File

@@ -2567,6 +2567,33 @@ class HeaderControlState extends State<HeaderControl>
title,
// show current datetime
...?timeBatteryWidgets,
if (Utils.isDesktop && !plPlayerController.isDesktopPip)
Obx(() {
final isAlwaysOnTop = plPlayerController.isAlwaysOnTop.value;
return SizedBox(
width: 42,
height: 34,
child: IconButton(
tooltip: '${isAlwaysOnTop ? '取消' : ''}置顶',
style: const ButtonStyle(
padding: WidgetStatePropertyAll(EdgeInsets.zero),
),
onPressed: () =>
plPlayerController.setAlwaysOnTop(!isAlwaysOnTop),
icon: isAlwaysOnTop
? const Icon(
size: 19,
Icons.push_pin,
color: Colors.white,
)
: const Icon(
size: 19,
Icons.push_pin_outlined,
color: Colors.white,
),
),
);
}),
if (!isFileSource) ...[
if (!isFSOrPip) ...[
if (videoDetailCtr.isUgc)