opt dialog button style

Signed-off-by: 21pages <pages21@163.com>
This commit is contained in:
21pages
2023-01-15 19:46:16 +08:00
parent b466bb013f
commit 62791613a7
18 changed files with 166 additions and 223 deletions

View File

@@ -174,23 +174,18 @@ class _FileManagerPageState extends State<FileManagerPage> {
],
),
actions: [
TextButton(
style: flatButtonStyle,
dialogButton("Cancel",
onPressed: () => close(false),
child: Text(translate("Cancel"))),
ElevatedButton(
style: flatButtonStyle,
onPressed: () {
if (name.value.text.isNotEmpty) {
model.createDir(PathUtil.join(
model.currentDir.path,
name.value.text,
model
.getCurrentIsWindows()));
close();
}
},
child: Text(translate("OK")))
isOutline: true),
dialogButton("OK", onPressed: () {
if (name.value.text.isNotEmpty) {
model.createDir(PathUtil.join(
model.currentDir.path,
name.value.text,
model.getCurrentIsWindows()));
close();
}
})
]));
} else if (v == "hidden") {
model.toggleShowHidden();

View File

@@ -1098,15 +1098,9 @@ void showSetOSPassword(
),
]),
actions: [
TextButton(
style: flatButtonStyle,
onPressed: () {
close();
},
child: Text(translate('Cancel')),
),
TextButton(
style: flatButtonStyle,
dialogButton('Cancel', onPressed: close, isOutline: true),
dialogButton(
'OK',
onPressed: () {
var text = controller.text.trim();
bind.sessionPeerOption(id: id, name: "os-password", value: text);
@@ -1117,7 +1111,6 @@ void showSetOSPassword(
}
close();
},
child: Text(translate('OK')),
),
]);
});

View File

@@ -273,13 +273,12 @@ class _SettingsState extends State<SettingsPage> with WidgetsBindingObserver {
content: Text(translate(
"android_open_battery_optimizations_tip")),
actions: [
TextButton(
onPressed: () => close(),
child: Text(translate("Cancel"))),
ElevatedButton(
onPressed: () => close(true),
child:
Text(translate("Open System Setting"))),
dialogButton("Cancel",
onPressed: () => close(), isOutline: true),
dialogButton(
"Open System Setting",
onPressed: () => close(true),
),
],
));
if (res == true) {