Merge pull request #3233 from grummbeer/unify-button-show-loading

Unify buttonstyle, unify dialog padding
This commit is contained in:
RustDesk 2023-02-16 17:38:28 +08:00 committed by GitHub
commit 95ffac5bb9
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -500,12 +500,14 @@ class OverlayDialogManager {
Offstage( Offstage(
offstage: !showCancel, offstage: !showCancel,
child: Center( child: Center(
child: TextButton( child: isDesktop
style: flatButtonStyle, ? dialogButton('Cancel', onPressed: cancel)
onPressed: cancel, : TextButton(
child: Text(translate('Cancel'), style: flatButtonStyle,
style: onPressed: cancel,
const TextStyle(color: MyTheme.accent))))) child: Text(translate('Cancel'),
style: const TextStyle(
color: MyTheme.accent)))))
])), ])),
onCancel: showCancel ? cancel : null, onCancel: showCancel ? cancel : null,
); );
@ -660,8 +662,8 @@ class CustomAlertDialog extends StatelessWidget {
scrollable: true, scrollable: true,
title: title, title: title,
titlePadding: EdgeInsets.fromLTRB(padding, 24, padding, 0), titlePadding: EdgeInsets.fromLTRB(padding, 24, padding, 0),
contentPadding: EdgeInsets.fromLTRB( contentPadding: EdgeInsets.fromLTRB(contentPadding ?? padding, 25,
contentPadding ?? padding, 25, contentPadding ?? padding, 10), contentPadding ?? padding, actions is List ? 10 : padding),
content: ConstrainedBox( content: ConstrainedBox(
constraints: contentBoxConstraints, constraints: contentBoxConstraints,
child: Theme( child: Theme(