diff --git a/lib/pages/blacklist/controller.dart b/lib/pages/blacklist/controller.dart index 615b0d8be..867bfedbf 100644 --- a/lib/pages/blacklist/controller.dart +++ b/lib/pages/blacklist/controller.dart @@ -43,7 +43,7 @@ class BlackListController ..value.data!.removeAt(index) ..refresh(); total.value -= 1; - SmartDialog.showToast('操作成功'); + SmartDialog.showToast('移除成功'); } }, ); diff --git a/lib/pages/common/common_intro_controller.dart b/lib/pages/common/common_intro_controller.dart index c486743b4..45d5ffec5 100644 --- a/lib/pages/common/common_intro_controller.dart +++ b/lib/pages/common/common_intro_controller.dart @@ -239,7 +239,7 @@ mixin FavMixin on TripleMixin { if (result.isSuccess) { updateFavCount(hasFav ? -1 : 1); this.hasFav.value = !hasFav; - SmartDialog.showToast('✅ 快速收藏/取消收藏成功'); + SmartDialog.showToast('${hasFav ? '取消' : ''}收藏成功'); } else { res.toast(); } @@ -283,7 +283,7 @@ mixin FavMixin on TripleMixin { updateFavCount(newVal ? 1 : -1); hasFav.value = newVal; } - SmartDialog.showToast('操作成功'); + SmartDialog.showToast('${newVal ? '' : '取消'}收藏成功'); } else { result.toast(); } diff --git a/lib/pages/common/common_whisper_controller.dart b/lib/pages/common/common_whisper_controller.dart index e82cb5a94..4a2887ede 100644 --- a/lib/pages/common/common_whisper_controller.dart +++ b/lib/pages/common/common_whisper_controller.dart @@ -56,7 +56,7 @@ abstract class CommonWhisperController if (res.isSuccess) { item.isMuted = !isMuted; loadingState.refresh(); - SmartDialog.showToast('操作成功'); + SmartDialog.showToast('设置成功'); } else { res.toast(); } diff --git a/lib/pages/group_panel/view.dart b/lib/pages/group_panel/view.dart index 4dab7f44e..921e41e25 100644 --- a/lib/pages/group_panel/view.dart +++ b/lib/pages/group_panel/view.dart @@ -59,7 +59,7 @@ class _GroupPanelState extends State { tags.isEmpty ? '0' : tags.join(','), ); if (res.isSuccess) { - SmartDialog.showToast('操作成功'); + SmartDialog.showToast('保存成功'); Get.back(result: tags); } else { res.toast(); diff --git a/lib/pages/later/controller.dart b/lib/pages/later/controller.dart index 69e1e561f..afb51c7ea 100644 --- a/lib/pages/later/controller.dart +++ b/lib/pages/later/controller.dart @@ -148,7 +148,7 @@ class LaterController extends MultiSelectController Get.find(tag: item.type.toString()).onReload(); } catch (_) {} } - SmartDialog.showToast('操作成功'); + SmartDialog.showToast('已清空'); } else { res.toast(); } diff --git a/lib/pages/live_room/view.dart b/lib/pages/live_room/view.dart index ff08d8178..e3b9c4122 100644 --- a/lib/pages/live_room/view.dart +++ b/lib/pages/live_room/view.dart @@ -393,7 +393,9 @@ class _LiveRoomPageState extends State Scaffold( resizeToAvoidBottomInset: false, backgroundColor: Colors.transparent, - appBar: _buildAppBar(isFullScreen), + appBar: isFullScreen && !isPortrait + ? null + : _buildAppBar(isFullScreen), body: isPortrait ? Obx( () { @@ -412,7 +414,9 @@ class _LiveRoomPageState extends State Widget _buildPH(bool isFullScreen) { final height = maxWidth / Style.aspectRatio16x9; - final videoHeight = isFullScreen ? maxHeight - padding.top : height; + final videoHeight = isFullScreen + ? maxHeight - (isPortrait ? padding.top : 0) + : height; final bottomHeight = maxHeight - padding.top - height - kToolbarHeight; return Column( children: [ @@ -440,7 +444,7 @@ class _LiveRoomPageState extends State Widget _buildPP(bool isFullScreen) { final bottomHeight = 70 + padding.bottom; final videoHeight = isFullScreen - ? maxHeight - padding.top + ? maxHeight - (isPortrait ? padding.top : 0) : maxHeight - bottomHeight; return Stack( clipBehavior: Clip.none, @@ -655,7 +659,9 @@ class _LiveRoomPageState extends State videoWidth = maxWidth - rightWidth - padding.horizontal; final videoHeight = maxHeight - padding.top - kToolbarHeight; final width = isFullScreen ? maxWidth : videoWidth; - final height = isFullScreen ? maxHeight - padding.top : videoHeight; + final height = isFullScreen + ? maxHeight - (isPortrait ? padding.top : 0) + : videoHeight; return Padding( padding: isFullScreen ? EdgeInsets.zero diff --git a/lib/pages/msg_feed_top/like_me/controller.dart b/lib/pages/msg_feed_top/like_me/controller.dart index 2d740a029..6fa919df2 100644 --- a/lib/pages/msg_feed_top/like_me/controller.dart +++ b/lib/pages/msg_feed_top/like_me/controller.dart @@ -92,7 +92,7 @@ class LikeMeController if (res.isSuccess) { item.noticeState = noticeState; loadingState.refresh(); - SmartDialog.showToast('操作成功'); + SmartDialog.showToast('设置成功'); } else { res.toast(); } diff --git a/lib/pages/video/view.dart b/lib/pages/video/view.dart index dc7307d94..24e2fd73c 100644 --- a/lib/pages/video/view.dart +++ b/lib/pages/video/view.dart @@ -515,42 +515,47 @@ class _VideoDetailPageVState extends State final isFullScreen = this.isFullScreen; return Scaffold( resizeToAvoidBottomInset: false, - appBar: PreferredSize( - preferredSize: const Size.fromHeight(0), - child: Obx( - () { - final scrollRatio = videoDetailController.scrollRatio.value; - final flag = - isPortrait && videoDetailController.scrollCtr.offset != 0; - return AppBar( - backgroundColor: flag && scrollRatio > 0 - ? Color.lerp( - Colors.black, - themeData.colorScheme.surface, - scrollRatio, - ) - : Colors.black, - toolbarHeight: 0, - systemOverlayStyle: Platform.isAndroid - ? SystemUiOverlayStyle( - statusBarIconBrightness: flag && scrollRatio >= 0.5 - ? themeData.brightness.reverse - : Brightness.light, - systemNavigationBarIconBrightness: - themeData.brightness.reverse, - ) - : null, - ); - }, - ), - ), + appBar: isFullScreen && !isPortrait + ? null + : PreferredSize( + preferredSize: const Size.fromHeight(0), + child: Obx( + () { + final scrollRatio = + videoDetailController.scrollRatio.value; + final flag = + isPortrait && + videoDetailController.scrollCtr.offset != 0; + return AppBar( + backgroundColor: flag && scrollRatio > 0 + ? Color.lerp( + Colors.black, + themeData.colorScheme.surface, + scrollRatio, + ) + : Colors.black, + toolbarHeight: 0, + systemOverlayStyle: Platform.isAndroid + ? SystemUiOverlayStyle( + statusBarIconBrightness: + flag && scrollRatio >= 0.5 + ? themeData.brightness.reverse + : Brightness.light, + systemNavigationBarIconBrightness: + themeData.brightness.reverse, + ) + : null, + ); + }, + ), + ), body: ExtendedNestedScrollView( key: videoDetailController.scrollKey, controller: videoDetailController.scrollCtr, onlyOneScrollInBody: true, pinnedHeaderSliverHeightBuilder: () { double pinnedHeight = this.isFullScreen || !isPortrait - ? maxHeight - padding.top + ? maxHeight - (isPortrait ? padding.top : 0) : videoDetailController.isExpanding || videoDetailController.isCollapsing ? animHeight @@ -576,7 +581,7 @@ class _VideoDetailPageVState extends State }, headerSliverBuilder: (context, innerBoxIsScrolled) { final height = isFullScreen || !isPortrait - ? maxHeight - padding.top + ? maxHeight - (isPortrait ? padding.top : 0) : videoDetailController.isExpanding || videoDetailController.isCollapsing ? animHeight @@ -812,7 +817,9 @@ class _VideoDetailPageVState extends State final isFullScreen = this.isFullScreen; return Scaffold( resizeToAvoidBottomInset: false, - appBar: AppBar(backgroundColor: Colors.black, toolbarHeight: 0), + appBar: isFullScreen && !isPortrait + ? null + : AppBar(backgroundColor: Colors.black, toolbarHeight: 0), body: Padding( padding: !isFullScreen ? padding.copyWith(top: 0, bottom: 0) @@ -945,7 +952,9 @@ class _VideoDetailPageVState extends State } final videoWidth = isFullScreen ? maxWidth : width; final double height = width / Style.aspectRatio16x9; - final videoHeight = isFullScreen ? maxHeight - padding.top : height; + final videoHeight = isFullScreen + ? maxHeight - (isPortrait ? padding.top : 0) + : height; if (height > maxHeight) { return childSplit(Style.aspectRatio16x9); } @@ -1038,7 +1047,9 @@ class _VideoDetailPageVState extends State final isFullScreen = this.isFullScreen; return Scaffold( resizeToAvoidBottomInset: false, - appBar: AppBar(backgroundColor: Colors.black, toolbarHeight: 0), + appBar: isFullScreen && !isPortrait + ? null + : AppBar(backgroundColor: Colors.black, toolbarHeight: 0), body: Padding( padding: !isFullScreen ? padding.copyWith(top: 0, bottom: 0) @@ -1061,7 +1072,9 @@ class _VideoDetailPageVState extends State } final shouldShowSeasonPanel = _shouldShowSeasonPanel; final double height = maxHeight / 2.5; - final videoHeight = isFullScreen ? maxHeight - padding.top : height; + final videoHeight = isFullScreen + ? maxHeight - (isPortrait ? padding.top : 0) + : height; final bottomHeight = maxHeight - height - padding.top; return Column( crossAxisAlignment: CrossAxisAlignment.start, @@ -1514,6 +1527,7 @@ class _VideoDetailPageVState extends State Obx(() { if (!videoDetailController.autoPlay) { return Positioned.fill( + bottom: -1, child: GestureDetector( onTap: handlePlay, behavior: .opaque, diff --git a/lib/plugin/pl_player/controller.dart b/lib/plugin/pl_player/controller.dart index 46b1d83b8..f9894e007 100644 --- a/lib/plugin/pl_player/controller.dart +++ b/lib/plugin/pl_player/controller.dart @@ -538,19 +538,21 @@ class PlPlayerController with BlockConfigMixin { case .portraitUp: if (!_isVertical && controlsLock.value) return; if (!horizontalScreen && !_isVertical && isFullScreen) { - triggerFullScreen(status: false, orientation: orientation); + if (!isManualFS) { + triggerFullScreen(status: false, orientation: orientation); + } } else { portraitUpMode(); } case .landscapeLeft: if (!horizontalScreen && !isFullScreen) { - triggerFullScreen(orientation: orientation); + triggerFullScreen(orientation: orientation, isManualFS: false); } else { landscapeLeftMode(); } case .landscapeRight: if (!horizontalScreen && !isFullScreen) { - triggerFullScreen(orientation: orientation); + triggerFullScreen(orientation: orientation, isManualFS: false); } else { landscapeRightMode(); } @@ -1413,6 +1415,7 @@ class PlPlayerController with BlockConfigMixin { } double screenRatio = 0.0; + bool isManualFS = true; late final FullScreenMode mode = Pref.fullScreenMode; late final horizontalScreen = Pref.horizontalScreen; @@ -1422,6 +1425,7 @@ class PlPlayerController with BlockConfigMixin { bool status = true, bool inAppFullScreen = false, DeviceOrientation? orientation, + bool isManualFS = true, }) async { if (isDesktopPip) return; if (isFullScreen.value == status) return; @@ -1429,6 +1433,7 @@ class PlPlayerController with BlockConfigMixin { if (_fsProcessing) return; _fsProcessing = true; toggleFullScreen(status); + this.isManualFS = isManualFS; try { if (status) { if (PlatformUtils.isMobile) { diff --git a/lib/utils/storage_pref.dart b/lib/utils/storage_pref.dart index 6cd5230cf..a08ec6aba 100644 --- a/lib/utils/storage_pref.dart +++ b/lib/utils/storage_pref.dart @@ -190,13 +190,15 @@ abstract final class Pref { defaultValue: UpPanelPosition.leftFixed.index, )]; - static FullScreenMode get fullScreenMode => - FullScreenMode.values[_setting.get( - SettingBoxKey.fullScreenMode, - defaultValue: horizontalScreen - ? FullScreenMode.none.index - : FullScreenMode.auto.index, - )]; + static FullScreenMode get fullScreenMode { + int? index = _setting.get(SettingBoxKey.fullScreenMode); + if (index == null) { + final FullScreenMode mode = horizontalScreen && isTablet ? .none : .auto; + _setting.put(SettingBoxKey.fullScreenMode, mode.index); + return mode; + } + return FullScreenMode.values[index]; + } static BtmProgressBehavior get btmProgressBehavior => BtmProgressBehavior.values[_setting.get( diff --git a/windows/runner/win32_window.cpp b/windows/runner/win32_window.cpp index e13aebdef..beb527998 100644 --- a/windows/runner/win32_window.cpp +++ b/windows/runner/win32_window.cpp @@ -219,9 +219,9 @@ Win32Window::MessageHandler(HWND hwnd, } return 0; - case WM_DWMCOLORIZATIONCOLORCHANGED: - UpdateTheme(hwnd); - return 0; +// case WM_DWMCOLORIZATIONCOLORCHANGED: +// UpdateTheme(hwnd); +// return 0; } return DefWindowProc(window_handle_, message, wparam, lparam);