Merge pull request #5973 from sahilyeole/fix/scam_warning

Fix scam warning overflow
This commit is contained in:
RustDesk 2023-10-11 11:47:34 +08:00 committed by GitHub
commit 73abd0f8b8
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -328,13 +328,20 @@ class _ScamWarningDialogState extends State<ScamWarningDialog> {
), ),
), ),
SizedBox(height: 18), SizedBox(height: 18),
Text( SizedBox(
translate("scam_text1")+"\n\n" height: 220,
+translate("scam_text2")+"\n", child: Scrollbar(
style: TextStyle( child: SingleChildScrollView(
color: Colors.white, child: Text(
fontWeight: FontWeight.bold, translate("scam_text1")+"\n\n"
fontSize: 16.0, +translate("scam_text2")+"\n",
style: TextStyle(
color: Colors.white,
fontWeight: FontWeight.bold,
fontSize: 16.0,
),
),
),
), ),
), ),
Row( Row(
@ -361,7 +368,9 @@ class _ScamWarningDialogState extends State<ScamWarningDialog> {
Row( Row(
mainAxisAlignment: MainAxisAlignment.end, mainAxisAlignment: MainAxisAlignment.end,
children: [ children: [
ElevatedButton( Container(
constraints: BoxConstraints(maxWidth: 150),
child: ElevatedButton(
onPressed: isButtonLocked onPressed: isButtonLocked
? null ? null
: () { : () {
@ -380,10 +389,15 @@ class _ScamWarningDialogState extends State<ScamWarningDialog> {
fontWeight: FontWeight.bold, fontWeight: FontWeight.bold,
fontSize: 13.0, fontSize: 13.0,
), ),
maxLines: 2,
overflow: TextOverflow.ellipsis,
), ),
), ),
),
SizedBox(width: 15), SizedBox(width: 15),
ElevatedButton( Container(
constraints: BoxConstraints(maxWidth: 150),
child: ElevatedButton(
onPressed: () { onPressed: () {
Navigator.of(context).pop(); Navigator.of(context).pop();
}, },
@ -396,8 +410,11 @@ class _ScamWarningDialogState extends State<ScamWarningDialog> {
fontWeight: FontWeight.bold, fontWeight: FontWeight.bold,
fontSize: 13.0, fontSize: 13.0,
), ),
maxLines: 2,
overflow: TextOverflow.ellipsis,
), ),
), ),
),
], ],
)])), )])),
contentPadding: EdgeInsets.all(0.0), contentPadding: EdgeInsets.all(0.0),