Page Install. Disable checkboxes when installation has been started.
This commit is contained in:
parent
c78e7ec49f
commit
67ad5e3e40
@ -97,6 +97,29 @@ class _InstallPageBodyState extends State<_InstallPageBody>
|
|||||||
windowManager.close();
|
windowManager.close();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
InkWell Option(RxBool option, {String label = ''}) {
|
||||||
|
return InkWell(
|
||||||
|
// todo mouseCursor: "SystemMouseCursors.forbidden" or no cursor on btnEnabled == false
|
||||||
|
borderRadius: BorderRadius.circular(6),
|
||||||
|
onTap: () => btnEnabled.value ? option.value = !option.value : null,
|
||||||
|
child: Row(
|
||||||
|
children: [
|
||||||
|
Obx(
|
||||||
|
() => Checkbox(
|
||||||
|
visualDensity: VisualDensity(horizontal: -4, vertical: -4),
|
||||||
|
value: option.value,
|
||||||
|
onChanged: (v) =>
|
||||||
|
btnEnabled.value ? option.value = !option.value : null,
|
||||||
|
).marginOnly(right: 8),
|
||||||
|
),
|
||||||
|
Expanded(
|
||||||
|
child: Text(translate(label)),
|
||||||
|
),
|
||||||
|
],
|
||||||
|
),
|
||||||
|
);
|
||||||
|
}
|
||||||
|
|
||||||
@override
|
@override
|
||||||
Widget build(BuildContext context) {
|
Widget build(BuildContext context) {
|
||||||
final double em = 13;
|
final double em = 13;
|
||||||
@ -132,60 +155,13 @@ class _InstallPageBodyState extends State<_InstallPageBody>
|
|||||||
)
|
)
|
||||||
],
|
],
|
||||||
).marginSymmetric(vertical: 2 * em),
|
).marginSymmetric(vertical: 2 * em),
|
||||||
InkWell(
|
Option(startmenu, label: 'Create start menu shortcuts')
|
||||||
borderRadius: BorderRadius.circular(6),
|
.marginOnly(bottom: 7),
|
||||||
onTap: () => startmenu.value = !startmenu.value,
|
Option(desktopicon, label: 'Create desktop icon'),
|
||||||
child: Row(
|
|
||||||
children: [
|
|
||||||
Obx(() => Checkbox(
|
|
||||||
visualDensity:
|
|
||||||
VisualDensity(horizontal: -4, vertical: -4),
|
|
||||||
value: startmenu.value,
|
|
||||||
onChanged: (b) {
|
|
||||||
if (b != null) startmenu.value = b;
|
|
||||||
}).marginOnly(right: 8)),
|
|
||||||
Expanded(
|
|
||||||
child: Text(translate('Create start menu shortcuts'))),
|
|
||||||
],
|
|
||||||
),
|
|
||||||
).marginOnly(bottom: 7),
|
|
||||||
InkWell(
|
|
||||||
borderRadius: BorderRadius.circular(6),
|
|
||||||
onTap: () => desktopicon.value = !desktopicon.value,
|
|
||||||
child: Row(
|
|
||||||
children: [
|
|
||||||
Obx(() => Checkbox(
|
|
||||||
visualDensity:
|
|
||||||
VisualDensity(horizontal: -4, vertical: -4),
|
|
||||||
value: desktopicon.value,
|
|
||||||
onChanged: (b) {
|
|
||||||
if (b != null) desktopicon.value = b;
|
|
||||||
}).marginOnly(right: 8)),
|
|
||||||
Expanded(child: Text(translate('Create desktop icon'))),
|
|
||||||
],
|
|
||||||
),
|
|
||||||
),
|
|
||||||
Offstage(
|
Offstage(
|
||||||
offstage: !Platform.isWindows,
|
offstage: !Platform.isWindows,
|
||||||
child: InkWell(
|
child: Option(driverCert, label: 'idd_driver_tip'),
|
||||||
borderRadius: BorderRadius.circular(6),
|
).marginOnly(top: 7),
|
||||||
onTap: () => driverCert.value = !driverCert.value,
|
|
||||||
child: Row(
|
|
||||||
children: [
|
|
||||||
Obx(() => Checkbox(
|
|
||||||
visualDensity:
|
|
||||||
VisualDensity(horizontal: -4, vertical: -4),
|
|
||||||
value: driverCert.value,
|
|
||||||
onChanged: (b) {
|
|
||||||
if (b != null) driverCert.value = b;
|
|
||||||
}).marginOnly(right: 8)),
|
|
||||||
Expanded(
|
|
||||||
child: Text(translate('idd_driver_tip')),
|
|
||||||
),
|
|
||||||
],
|
|
||||||
),
|
|
||||||
).marginOnly(top: 7),
|
|
||||||
),
|
|
||||||
Container(
|
Container(
|
||||||
padding: EdgeInsets.all(12),
|
padding: EdgeInsets.all(12),
|
||||||
decoration: BoxDecoration(
|
decoration: BoxDecoration(
|
||||||
|
Loading…
x
Reference in New Issue
Block a user