diff options
Diffstat (limited to 'src/ui/mobile.c')
-rw-r--r-- | src/ui/mobile.c | 51 |
1 files changed, 32 insertions, 19 deletions
diff --git a/src/ui/mobile.c b/src/ui/mobile.c index 6c3a0b32..d678f3e1 100644 --- a/src/ui/mobile.c +++ b/src/ui/mobile.c | |||
@@ -381,22 +381,22 @@ void finalizeSheet_Mobile(iWidget *sheet) { | |||
381 | } | 381 | } |
382 | /* TODO: In portrait, top panel and detail stack are all stacked together. | 382 | /* TODO: In portrait, top panel and detail stack are all stacked together. |
383 | 383 | ||
384 | Landscape Layout Portrait Layout | 384 | Landscape Layout Portrait Layout |
385 | 385 | ||
386 | ┌─────────┬──────Detail─Stack─────┐ ┌─────────┬ ─ ─ ─ ─ ┐ | 386 | ┌─────────┬──────Detail─Stack─────┐ ┌─────────┬ ─ ─ ─ ─ ┐ |
387 | │ │┌───────────────────┐ │ │ │Detail | 387 | │ │┌───────────────────┐ │ │ │Detail |
388 | │ ││┌──────────────────┴┐ │ │ │Stack │ | 388 | │ ││┌──────────────────┴┐ │ │ │Stack │ |
389 | │ │││┌──────────────────┴┐│ │ │┌──────┐ | 389 | │ │││┌──────────────────┴┐│ │ │┌──────┐ |
390 | │ ││││ ││ │ ││┌─────┴┐│ | 390 | │ ││││ ││ │ ││┌─────┴┐│ |
391 | │ ││││ ││ │ │││ │ | 391 | │ ││││ ││ │ │││ │ |
392 | │Top Panel││││ ││ │Top Panel│││ ││ | 392 | │Top Panel││││ ││ │Top Panel│││ ││ |
393 | │ ││││ Panels ││ │ │││Panels│ | 393 | │ ││││ Panels ││ │ │││Panels│ |
394 | │ ││││ ││ │ │││ ││ | 394 | │ ││││ ││ │ │││ ││ |
395 | │ │└┤│ ││ │ │││ │ | 395 | │ │└┤│ ││ │ │││ │ |
396 | │ │ └┤ ││ │ │└┤ ││ | 396 | │ │ └┤ ││ │ │└┤ ││ |
397 | │ │ └───────────────────┘│ │ │ └──────┘ | 397 | │ │ └───────────────────┘│ │ │ └──────┘ |
398 | └─────────┴───────────────────────┘ └─────────┴ ─ ─ ─ ─ ┘ | 398 | └─────────┴───────────────────────┘ └─────────┴ ─ ─ ─ ─ ┘ |
399 | offscreen | 399 | offscreen |
400 | */ | 400 | */ |
401 | /* Modify the top sheet to act as a fullscreen background. */ | 401 | /* Modify the top sheet to act as a fullscreen background. */ |
402 | setPadding1_Widget(sheet, 0); | 402 | setPadding1_Widget(sheet, 0); |
@@ -759,6 +759,9 @@ void finalizeSheet_Mobile(iWidget *sheet) { | |||
759 | else { | 759 | else { |
760 | arrange_Widget(sheet); | 760 | arrange_Widget(sheet); |
761 | } | 761 | } |
762 | if (!useMobileSheetLayout_()) { | ||
763 | setupSheetTransition_Mobile(sheet, iTrue); | ||
764 | } | ||
762 | postRefresh_App(); | 765 | postRefresh_App(); |
763 | } | 766 | } |
764 | 767 | ||
@@ -784,16 +787,26 @@ void setupMenuTransition_Mobile(iWidget *sheet, iBool isIncoming) { | |||
784 | } | 787 | } |
785 | 788 | ||
786 | void setupSheetTransition_Mobile(iWidget *sheet, iBool isIncoming) { | 789 | void setupSheetTransition_Mobile(iWidget *sheet, iBool isIncoming) { |
787 | if (isSideBySideLayout_()) { | 790 | if (!useMobileSheetLayout_()) { |
791 | setFlags_Widget(sheet, horizontalOffset_WidgetFlag, iFalse); | ||
792 | if (isIncoming) { | ||
793 | setVisualOffset_Widget(sheet, -height_Widget(sheet), 0, 0); | ||
794 | setVisualOffset_Widget(sheet, 0, 200, easeOut_AnimFlag | softer_AnimFlag); | ||
795 | } | ||
796 | else { | ||
797 | setVisualOffset_Widget(sheet, -height_Widget(sheet), 200, easeIn_AnimFlag); | ||
798 | } | ||
799 | return; | ||
800 | } | ||
801 | if(isSideBySideLayout_()) { | ||
788 | return; | 802 | return; |
789 | } | 803 | } |
804 | setFlags_Widget(sheet, horizontalOffset_WidgetFlag, iTrue); | ||
790 | if (isIncoming) { | 805 | if (isIncoming) { |
791 | setFlags_Widget(sheet, horizontalOffset_WidgetFlag, iTrue); | ||
792 | setVisualOffset_Widget(sheet, size_Root(sheet->root).x, 0, 0); | 806 | setVisualOffset_Widget(sheet, size_Root(sheet->root).x, 0, 0); |
793 | setVisualOffset_Widget(sheet, 0, 200, easeOut_AnimFlag); | 807 | setVisualOffset_Widget(sheet, 0, 200, easeOut_AnimFlag); |
794 | } | 808 | } |
795 | else { | 809 | else { |
796 | setFlags_Widget(sheet, horizontalOffset_WidgetFlag, iTrue); | ||
797 | const iBool wasDragged = iAbs(value_Anim(&sheet->visualOffset)) > 0; | 810 | const iBool wasDragged = iAbs(value_Anim(&sheet->visualOffset)) > 0; |
798 | setVisualOffset_Widget(sheet, size_Root(sheet->root).x, wasDragged ? 100 : 200, | 811 | setVisualOffset_Widget(sheet, size_Root(sheet->root).x, wasDragged ? 100 : 200, |
799 | wasDragged ? 0 : easeIn_AnimFlag); | 812 | wasDragged ? 0 : easeIn_AnimFlag); |