mirror of
https://github.com/bggRGjQaUbCoE/PiliPlus.git
synced 2026-06-01 00:28:18 +08:00
@@ -708,13 +708,12 @@ class HeaderControlState extends State<HeaderControl>
|
|||||||
onTap: () async {
|
onTap: () async {
|
||||||
Get.back();
|
Get.back();
|
||||||
try {
|
try {
|
||||||
final FilePickerResult? file = await FilePicker.platform
|
final result = await FilePicker.platform.pickFiles();
|
||||||
.pickFiles();
|
if (result != null) {
|
||||||
if (file != null) {
|
final file = result.files.single;
|
||||||
final first = file.files.first;
|
final path = file.path;
|
||||||
final path = first.path;
|
|
||||||
if (path != null) {
|
if (path != null) {
|
||||||
final name = first.name;
|
final name = file.name;
|
||||||
final length = videoDetailCtr.subtitles.length;
|
final length = videoDetailCtr.subtitles.length;
|
||||||
if (name.endsWith('.json')) {
|
if (name.endsWith('.json')) {
|
||||||
final file = File(path);
|
final file = File(path);
|
||||||
|
|||||||
@@ -230,6 +230,7 @@ class PlPlayerController {
|
|||||||
late bool isDesktopPip = false;
|
late bool isDesktopPip = false;
|
||||||
late Rect _lastWindowBounds;
|
late Rect _lastWindowBounds;
|
||||||
|
|
||||||
|
late final showWindowTitleBar = Pref.showWindowTitleBar;
|
||||||
late final RxBool isAlwaysOnTop = false.obs;
|
late final RxBool isAlwaysOnTop = false.obs;
|
||||||
Future<void> setAlwaysOnTop(bool value) {
|
Future<void> setAlwaysOnTop(bool value) {
|
||||||
isAlwaysOnTop.value = value;
|
isAlwaysOnTop.value = value;
|
||||||
@@ -239,8 +240,8 @@ class PlPlayerController {
|
|||||||
Future<void> exitDesktopPip() {
|
Future<void> exitDesktopPip() {
|
||||||
isDesktopPip = false;
|
isDesktopPip = false;
|
||||||
return Future.wait([
|
return Future.wait([
|
||||||
windowManager.setTitleBarStyle(
|
if (showWindowTitleBar)
|
||||||
Pref.showWindowTitleBar ? TitleBarStyle.normal : TitleBarStyle.hidden),
|
windowManager.setTitleBarStyle(TitleBarStyle.normal),
|
||||||
windowManager.setMinimumSize(const Size(400, 700)),
|
windowManager.setMinimumSize(const Size(400, 700)),
|
||||||
windowManager.setBounds(_lastWindowBounds),
|
windowManager.setBounds(_lastWindowBounds),
|
||||||
setAlwaysOnTop(false),
|
setAlwaysOnTop(false),
|
||||||
@@ -255,7 +256,9 @@ class PlPlayerController {
|
|||||||
|
|
||||||
_lastWindowBounds = await windowManager.getBounds();
|
_lastWindowBounds = await windowManager.getBounds();
|
||||||
|
|
||||||
windowManager.setTitleBarStyle(TitleBarStyle.hidden);
|
if (showWindowTitleBar) {
|
||||||
|
windowManager.setTitleBarStyle(TitleBarStyle.hidden);
|
||||||
|
}
|
||||||
|
|
||||||
late final Size size;
|
late final Size size;
|
||||||
final state = videoController!.player.state;
|
final state = videoController!.player.state;
|
||||||
|
|||||||
Reference in New Issue
Block a user