mirror of
https://github.com/HChaZZY/PiliPlus.git
synced 2025-12-06 09:13:48 +08:00
opt: restore scale btn
Signed-off-by: bggRGjQaUbCoE <githubaccount56556@proton.me>
This commit is contained in:
@@ -1612,5 +1612,5 @@ class PlPlayerController {
|
|||||||
late final RxList dmTrend = [].obs;
|
late final RxList dmTrend = [].obs;
|
||||||
late final RxBool showDmChart = true.obs;
|
late final RxBool showDmChart = true.obs;
|
||||||
|
|
||||||
late final RxDouble videoScale = 1.0.obs;
|
late final RxBool showRestoreScaleBtn = false.obs;
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -704,8 +704,8 @@ class _PLVideoPlayerState extends State<PLVideoPlayer>
|
|||||||
},
|
},
|
||||||
|
|
||||||
onInteractionUpdate: (ScaleUpdateDetails details) {
|
onInteractionUpdate: (ScaleUpdateDetails details) {
|
||||||
plPlayerController.videoScale.value =
|
plPlayerController.showRestoreScaleBtn.value =
|
||||||
transformationController.value.row0.x;
|
transformationController.value.row0.x != 1.0;
|
||||||
if (interacting || _initialFocalPoint == Offset.zero) return;
|
if (interacting || _initialFocalPoint == Offset.zero) return;
|
||||||
Offset cumulativeDelta =
|
Offset cumulativeDelta =
|
||||||
details.localFocalPoint - _initialFocalPoint;
|
details.localFocalPoint - _initialFocalPoint;
|
||||||
@@ -1147,7 +1147,7 @@ class _PLVideoPlayerState extends State<PLVideoPlayer>
|
|||||||
// ),
|
// ),
|
||||||
|
|
||||||
Obx(
|
Obx(
|
||||||
() => plPlayerController.videoScale.value != 1 &&
|
() => plPlayerController.showRestoreScaleBtn.value &&
|
||||||
plPlayerController.showControls.value
|
plPlayerController.showControls.value
|
||||||
? Align(
|
? Align(
|
||||||
alignment: Alignment.bottomCenter,
|
alignment: Alignment.bottomCenter,
|
||||||
@@ -1169,7 +1169,7 @@ class _PLVideoPlayerState extends State<PLVideoPlayer>
|
|||||||
),
|
),
|
||||||
),
|
),
|
||||||
onPressed: () async {
|
onPressed: () async {
|
||||||
plPlayerController.videoScale.value = 1.0;
|
plPlayerController.showRestoreScaleBtn.value = false;
|
||||||
final animController = AnimationController(
|
final animController = AnimationController(
|
||||||
vsync: this,
|
vsync: this,
|
||||||
duration: const Duration(milliseconds: 255),
|
duration: const Duration(milliseconds: 255),
|
||||||
|
|||||||
Reference in New Issue
Block a user