From 387d712b6722942a4ed8356842f4c0a61f3a085e Mon Sep 17 00:00:00 2001 From: Sahil Yeole Date: Tue, 10 Oct 2023 20:58:58 +0530 Subject: [PATCH 1/3] make scam alert text scrollable Signed-off-by: Sahil Yeole --- flutter/lib/mobile/pages/server_page.dart | 21 ++++++++++++++------- 1 file changed, 14 insertions(+), 7 deletions(-) diff --git a/flutter/lib/mobile/pages/server_page.dart b/flutter/lib/mobile/pages/server_page.dart index e31312905..972386667 100644 --- a/flutter/lib/mobile/pages/server_page.dart +++ b/flutter/lib/mobile/pages/server_page.dart @@ -328,13 +328,20 @@ class _ScamWarningDialogState extends State { ), ), SizedBox(height: 18), - Text( - translate("scam_text1")+"\n\n" - +translate("scam_text2")+"\n", - style: TextStyle( - color: Colors.white, - fontWeight: FontWeight.bold, - fontSize: 16.0, + SizedBox( + height: 250, + child: Scrollbar( + child: SingleChildScrollView( + child: Text( + translate("scam_text1")+"\n\n" + +translate("scam_text2")+"\n", + style: TextStyle( + color: Colors.white, + fontWeight: FontWeight.bold, + fontSize: 16.0, + ), + ), + ), ), ), Row( From 20a4cd49debce3e939373489b49316dd6125b1af Mon Sep 17 00:00:00 2001 From: Sahil Yeole Date: Tue, 10 Oct 2023 21:32:05 +0530 Subject: [PATCH 2/3] update scam text height Signed-off-by: Sahil Yeole --- flutter/lib/mobile/pages/server_page.dart | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/flutter/lib/mobile/pages/server_page.dart b/flutter/lib/mobile/pages/server_page.dart index 972386667..deaddbea6 100644 --- a/flutter/lib/mobile/pages/server_page.dart +++ b/flutter/lib/mobile/pages/server_page.dart @@ -329,7 +329,7 @@ class _ScamWarningDialogState extends State { ), SizedBox(height: 18), SizedBox( - height: 250, + height: 220, child: Scrollbar( child: SingleChildScrollView( child: Text( From ab982e86c391dc31aba67e9439c0bd93143b84af Mon Sep 17 00:00:00 2001 From: Sahil Yeole Date: Tue, 10 Oct 2023 22:48:23 +0530 Subject: [PATCH 3/3] fix scam alert buttons overflow Signed-off-by: Sahil Yeole --- flutter/lib/mobile/pages/server_page.dart | 14 ++++++++++++-- 1 file changed, 12 insertions(+), 2 deletions(-) diff --git a/flutter/lib/mobile/pages/server_page.dart b/flutter/lib/mobile/pages/server_page.dart index deaddbea6..5dc6f3526 100644 --- a/flutter/lib/mobile/pages/server_page.dart +++ b/flutter/lib/mobile/pages/server_page.dart @@ -368,7 +368,9 @@ class _ScamWarningDialogState extends State { Row( mainAxisAlignment: MainAxisAlignment.end, children: [ - ElevatedButton( + Container( + constraints: BoxConstraints(maxWidth: 150), + child: ElevatedButton( onPressed: isButtonLocked ? null : () { @@ -387,10 +389,15 @@ class _ScamWarningDialogState extends State { fontWeight: FontWeight.bold, fontSize: 13.0, ), + maxLines: 2, + overflow: TextOverflow.ellipsis, ), ), + ), SizedBox(width: 15), - ElevatedButton( + Container( + constraints: BoxConstraints(maxWidth: 150), + child: ElevatedButton( onPressed: () { Navigator.of(context).pop(); }, @@ -403,8 +410,11 @@ class _ScamWarningDialogState extends State { fontWeight: FontWeight.bold, fontSize: 13.0, ), + maxLines: 2, + overflow: TextOverflow.ellipsis, ), ), + ), ], )])), contentPadding: EdgeInsets.all(0.0),