@@ -875,7 +875,7 @@ class SettingsBrowserPageState extends State<SettingsBrowserPage> {
875
875
),
876
876
),
877
877
Padding (
878
- padding: const EdgeInsets .fromLTRB (20 , 0 , 20 , 20 ),
878
+ padding: const EdgeInsets .fromLTRB (20 , 0 , 20 , 0 ),
879
879
child: Text (
880
880
'Enable this option if you are getting logged out from Torn consistently; '
881
881
'Torn PDA will try to reestablish your session ID when the browser opens' ,
@@ -886,6 +886,37 @@ class SettingsBrowserPageState extends State<SettingsBrowserPage> {
886
886
),
887
887
),
888
888
),
889
+ Padding (
890
+ padding: const EdgeInsets .fromLTRB (20 , 20 , 20 , 0 ),
891
+ child: Row (
892
+ mainAxisAlignment: MainAxisAlignment .spaceBetween,
893
+ children: < Widget > [
894
+ Flexible (child: const Text ("Do not pause webviews" )),
895
+ Switch (
896
+ value: _webViewProvider.browserDoNotPauseWebview,
897
+ onChanged: (value) {
898
+ setState (() {
899
+ _webViewProvider.browserDoNotPauseWebview = value;
900
+ });
901
+ },
902
+ activeTrackColor: Colors .lightGreenAccent,
903
+ activeColor: Colors .green,
904
+ ),
905
+ ],
906
+ ),
907
+ ),
908
+ Padding (
909
+ padding: const EdgeInsets .fromLTRB (20 , 0 , 20 , 20 ),
910
+ child: Text (
911
+ 'This will prevent the browser from pausing when the app or browser are in the background. '
912
+ 'NOTE: it is NOT recommended to activate this setting, as it will consume more battery and resources' ,
913
+ style: TextStyle (
914
+ color: Colors .grey[600 ],
915
+ fontSize: 12 ,
916
+ fontStyle: FontStyle .italic,
917
+ ),
918
+ ),
919
+ ),
889
920
],
890
921
);
891
922
}
@@ -1801,6 +1832,35 @@ class SettingsBrowserPageState extends State<SettingsBrowserPage> {
1801
1832
),
1802
1833
),
1803
1834
),
1835
+ if (_browserStyle == 0 )
1836
+ Column (
1837
+ children: [
1838
+ Padding (
1839
+ padding: const EdgeInsets .symmetric (horizontal: 20 ),
1840
+ child: Row (
1841
+ mainAxisAlignment: MainAxisAlignment .spaceBetween,
1842
+ children: < Widget > [
1843
+ Flexible (child: const Text ("Show navigation arrows" )),
1844
+ _navArrowsDropdown (),
1845
+ ],
1846
+ ),
1847
+ ),
1848
+ Padding (
1849
+ padding: const EdgeInsets .symmetric (horizontal: 20 ),
1850
+ child: Text (
1851
+ 'When using the default browser style, forward and backward navigation arrows will be shown '
1852
+ 'by default when using a wide enough screen. You can disable them or make them also visible '
1853
+ 'on narrower screens (bear in mind that this might interfere with the space available for page title)' ,
1854
+ style: TextStyle (
1855
+ color: Colors .grey[600 ],
1856
+ fontSize: 12 ,
1857
+ fontStyle: FontStyle .italic,
1858
+ ),
1859
+ ),
1860
+ ),
1861
+ ],
1862
+ ),
1863
+
1804
1864
/*
1805
1865
Padding(
1806
1866
padding: const EdgeInsets.symmetric(horizontal: 20),
@@ -3522,6 +3582,79 @@ class SettingsBrowserPageState extends State<SettingsBrowserPage> {
3522
3582
);
3523
3583
}
3524
3584
3585
+ Widget _navArrowsDropdown () {
3586
+ return DropdownButton <String >(
3587
+ value: _settingsProvider.browserShowNavArrowsAppbar,
3588
+ items: const [
3589
+ DropdownMenuItem (
3590
+ value: "off" ,
3591
+ child: SizedBox (
3592
+ width: 100 ,
3593
+ child: Text (
3594
+ "Off" ,
3595
+ textAlign: TextAlign .right,
3596
+ style: TextStyle (
3597
+ fontSize: 12 ,
3598
+ ),
3599
+ ),
3600
+ ),
3601
+ ),
3602
+ DropdownMenuItem (
3603
+ value: "narrow" ,
3604
+ child: SizedBox (
3605
+ width: 100 ,
3606
+ child: Text (
3607
+ "Always" ,
3608
+ textAlign: TextAlign .right,
3609
+ style: TextStyle (
3610
+ fontSize: 12 ,
3611
+ ),
3612
+ ),
3613
+ ),
3614
+ ),
3615
+ DropdownMenuItem (
3616
+ value: "wide" ,
3617
+ child: SizedBox (
3618
+ width: 100 ,
3619
+ child: Text (
3620
+ "Wide screen" ,
3621
+ textAlign: TextAlign .right,
3622
+ style: TextStyle (
3623
+ fontSize: 12 ,
3624
+ ),
3625
+ ),
3626
+ ),
3627
+ ),
3628
+ ],
3629
+ onChanged: (value) {
3630
+ if (value == null ) return ;
3631
+ setState (() {
3632
+ _settingsProvider.browserShowNavArrowsAppbar = value;
3633
+ });
3634
+
3635
+ if (_settingsProvider.browserShowNavArrowsAppbar == "narrow" ) {
3636
+ double width = MediaQuery .of (context).size.width;
3637
+ if (width < 500 ) {
3638
+ BotToast .showText (
3639
+ clickClose: true ,
3640
+ text: "Please note that your current screen configuration (${width .round ()} DPI) might "
3641
+ "not be wide enough to display the navigation arrows in all circumstances (e.g. when other "
3642
+ "icons are present, such as when chaining)."
3643
+ "\n\n Remember you can always swipe left or right in the page title to navigate." ,
3644
+ textStyle: const TextStyle (
3645
+ fontSize: 14 ,
3646
+ color: Colors .white,
3647
+ ),
3648
+ contentColor: Colors .blue[600 ]! ,
3649
+ duration: const Duration (seconds: 15 ),
3650
+ contentPadding: const EdgeInsets .all (10 ),
3651
+ );
3652
+ }
3653
+ }
3654
+ },
3655
+ );
3656
+ }
3657
+
3525
3658
/*
3526
3659
DropdownButton _profileStatsDropdown() {
3527
3660
return DropdownButton<String>(
0 commit comments