Merge pull request #4813 from dignow/refact/login_dialog

login dialog, add button style for close button
This commit is contained in:
RustDesk 2023-07-01 14:15:35 +08:00 committed by GitHub
commit 90e0988c74
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -507,13 +507,31 @@ Future<bool?> loginDialog() async {
translate('Login'),
).marginOnly(top: MyTheme.dialogPadding),
TextButton(
style: ButtonStyle(
overlayColor: MaterialStateProperty.resolveWith<Color?>(
(Set<MaterialState> states) {
if (states.contains(MaterialState.hovered)) {
return Colors.red;
}
return null;
},
),
padding: MaterialStateProperty.all<EdgeInsetsGeometry>(
EdgeInsets.all(5)),
minimumSize: MaterialStateProperty.all(
Size(0, 0),
),
shape: MaterialStateProperty.all(RoundedRectangleBorder(
side: BorderSide.none,
borderRadius: BorderRadius.all(Radius.circular(5)))),
),
child: Icon(
Icons.close,
size: 20,
size: 22,
color: Colors.black54,
),
onPressed: onDialogCancel,
).marginOnly(top: 5),
).marginOnly(top: 5, right: 5),
],
);
final titlePadding = EdgeInsets.fromLTRB(MyTheme.dialogPadding, 0, 0, 0);