mirror of
https://github.com/bggRGjQaUbCoE/PiliPlus.git
synced 2026-04-20 11:08:03 +08:00
@@ -330,17 +330,21 @@ class PageUtils {
|
||||
);
|
||||
}
|
||||
|
||||
static void enterPip(Floating floating, int width, int height) {
|
||||
Rational aspectRatio = Rational(width, height);
|
||||
floating.enable(
|
||||
EnableManual(
|
||||
aspectRatio: aspectRatio.fitsInAndroidRequirements
|
||||
? aspectRatio
|
||||
: height > width
|
||||
? const Rational.vertical()
|
||||
: const Rational.landscape(),
|
||||
),
|
||||
);
|
||||
static void enterPip({int? width, int? height}) {
|
||||
if (width != null && height != null) {
|
||||
Rational aspectRatio = Rational(width, height);
|
||||
Floating().enable(
|
||||
EnableManual(
|
||||
aspectRatio: aspectRatio.fitsInAndroidRequirements
|
||||
? aspectRatio
|
||||
: height > width
|
||||
? const Rational.vertical()
|
||||
: const Rational.landscape(),
|
||||
),
|
||||
);
|
||||
} else {
|
||||
Floating().enable(const EnableManual());
|
||||
}
|
||||
}
|
||||
|
||||
static Future<void> pushDynDetail(DynamicItemModel item, floor,
|
||||
|
||||
Reference in New Issue
Block a user