Signed-off-by: dom <githubaccount56556@proton.me>
This commit is contained in:
dom
2026-02-04 19:54:44 +08:00
parent c099738802
commit 672375b925
2 changed files with 11 additions and 9 deletions

View File

@@ -230,6 +230,7 @@ class PlPlayerController {
late bool isDesktopPip = false;
late Rect _lastWindowBounds;
late final showWindowTitleBar = Pref.showWindowTitleBar;
late final RxBool isAlwaysOnTop = false.obs;
Future<void> setAlwaysOnTop(bool value) {
isAlwaysOnTop.value = value;
@@ -239,8 +240,8 @@ class PlPlayerController {
Future<void> exitDesktopPip() {
isDesktopPip = false;
return Future.wait([
windowManager.setTitleBarStyle(
Pref.showWindowTitleBar ? TitleBarStyle.normal : TitleBarStyle.hidden),
if (showWindowTitleBar)
windowManager.setTitleBarStyle(TitleBarStyle.normal),
windowManager.setMinimumSize(const Size(400, 700)),
windowManager.setBounds(_lastWindowBounds),
setAlwaysOnTop(false),
@@ -255,7 +256,9 @@ class PlPlayerController {
_lastWindowBounds = await windowManager.getBounds();
windowManager.setTitleBarStyle(TitleBarStyle.hidden);
if (showWindowTitleBar) {
windowManager.setTitleBarStyle(TitleBarStyle.hidden);
}
late final Size size;
final state = videoController!.player.state;