#315 viewer: use 1/8 for screen edge width ratio in landscape
This commit is contained in:
parent
0739222e66
commit
bae85ae80b
1 changed files with 13 additions and 4 deletions
|
@ -226,10 +226,10 @@ class _EntryPageViewState extends State<EntryPageView> {
|
|||
? (alignment) {
|
||||
final x = alignment.x;
|
||||
if (seekGesture) {
|
||||
if (x < .25) {
|
||||
if (x < sideRatio) {
|
||||
_applyAction(EntryAction.videoReplay10);
|
||||
return true;
|
||||
} else if (x > .75) {
|
||||
} else if (x > 1 - sideRatio) {
|
||||
_applyAction(EntryAction.videoSkip10);
|
||||
return true;
|
||||
}
|
||||
|
@ -394,10 +394,10 @@ class _EntryPageViewState extends State<EntryPageView> {
|
|||
void _onTap({Alignment? alignment}) {
|
||||
if (settings.viewerGestureSideTapNext && alignment != null) {
|
||||
final x = alignment.x;
|
||||
if (x < .25) {
|
||||
if (x < sideRatio) {
|
||||
JumpToPreviousEntryNotification().dispatch(context);
|
||||
return;
|
||||
} else if (x > .75) {
|
||||
} else if (x > 1 - sideRatio) {
|
||||
JumpToNextEntryNotification().dispatch(context);
|
||||
return;
|
||||
}
|
||||
|
@ -419,6 +419,15 @@ class _EntryPageViewState extends State<EntryPageView> {
|
|||
);
|
||||
}
|
||||
|
||||
double get sideRatio {
|
||||
switch (context.read<MediaQueryData>().orientation) {
|
||||
case Orientation.portrait:
|
||||
return 1 / 4;
|
||||
case Orientation.landscape:
|
||||
return 1 / 8;
|
||||
}
|
||||
}
|
||||
|
||||
static ScaleState _vectorScaleStateCycle(ScaleState actual) {
|
||||
switch (actual) {
|
||||
case ScaleState.initial:
|
||||
|
|
Loading…
Reference in a new issue