@@ -1177,7 +1177,7 @@ class _SafetyState extends State<_Safety> with AutomaticKeepAliveClientMixin {
|
|||||||
],
|
],
|
||||||
),
|
),
|
||||||
enabled: tmpEnabled && !locked),
|
enabled: tmpEnabled && !locked),
|
||||||
numericOneTimePassword,
|
if (usePassword) numericOneTimePassword,
|
||||||
if (usePassword) radios[1],
|
if (usePassword) radios[1],
|
||||||
if (usePassword)
|
if (usePassword)
|
||||||
_SubButton('Set permanent password', setPasswordDialog,
|
_SubButton('Set permanent password', setPasswordDialog,
|
||||||
|
|||||||
@@ -1130,6 +1130,14 @@ void showOptions(
|
|||||||
if (pi.displays.length > 1 && pi.currentDisplay != kAllDisplayValue) {
|
if (pi.displays.length > 1 && pi.currentDisplay != kAllDisplayValue) {
|
||||||
final cur = pi.currentDisplay;
|
final cur = pi.currentDisplay;
|
||||||
final children = <Widget>[];
|
final children = <Widget>[];
|
||||||
|
final isDarkTheme = MyTheme.currentThemeMode() == ThemeMode.dark;
|
||||||
|
final numColorSelected = Colors.white;
|
||||||
|
final numColorUnselected = isDarkTheme ? Colors.grey : Colors.black87;
|
||||||
|
// We can't use `Theme.of(context).primaryColor` here, the color is:
|
||||||
|
// - light theme: 0xff2196f3 (Colors.blue)
|
||||||
|
// - dark theme: 0xff212121 (the canvas color?)
|
||||||
|
final numBgSelected =
|
||||||
|
Theme.of(context).colorScheme.primary.withOpacity(0.6);
|
||||||
for (var i = 0; i < pi.displays.length; ++i) {
|
for (var i = 0; i < pi.displays.length; ++i) {
|
||||||
children.add(InkWell(
|
children.add(InkWell(
|
||||||
onTap: () {
|
onTap: () {
|
||||||
@@ -1143,13 +1151,12 @@ void showOptions(
|
|||||||
decoration: BoxDecoration(
|
decoration: BoxDecoration(
|
||||||
border: Border.all(color: Theme.of(context).hintColor),
|
border: Border.all(color: Theme.of(context).hintColor),
|
||||||
borderRadius: BorderRadius.circular(2),
|
borderRadius: BorderRadius.circular(2),
|
||||||
color: i == cur
|
color: i == cur ? numBgSelected : null),
|
||||||
? Theme.of(context).primaryColor.withOpacity(0.6)
|
|
||||||
: null),
|
|
||||||
child: Center(
|
child: Center(
|
||||||
child: Text((i + 1).toString(),
|
child: Text((i + 1).toString(),
|
||||||
style: TextStyle(
|
style: TextStyle(
|
||||||
color: i == cur ? Colors.white : Colors.black87,
|
color:
|
||||||
|
i == cur ? numColorSelected : numColorUnselected,
|
||||||
fontWeight: FontWeight.bold))))));
|
fontWeight: FontWeight.bold))))));
|
||||||
}
|
}
|
||||||
displays.add(Padding(
|
displays.add(Padding(
|
||||||
|
|||||||
@@ -590,6 +590,14 @@ void showOptions(
|
|||||||
if (pi.displays.length > 1 && pi.currentDisplay != kAllDisplayValue) {
|
if (pi.displays.length > 1 && pi.currentDisplay != kAllDisplayValue) {
|
||||||
final cur = pi.currentDisplay;
|
final cur = pi.currentDisplay;
|
||||||
final children = <Widget>[];
|
final children = <Widget>[];
|
||||||
|
final isDarkTheme = MyTheme.currentThemeMode() == ThemeMode.dark;
|
||||||
|
final numColorSelected = Colors.white;
|
||||||
|
final numColorUnselected = isDarkTheme ? Colors.grey : Colors.black87;
|
||||||
|
// We can't use `Theme.of(context).primaryColor` here, the color is:
|
||||||
|
// - light theme: 0xff2196f3 (Colors.blue)
|
||||||
|
// - dark theme: 0xff212121 (the canvas color?)
|
||||||
|
final numBgSelected =
|
||||||
|
Theme.of(context).colorScheme.primary.withOpacity(0.6);
|
||||||
for (var i = 0; i < pi.displays.length; ++i) {
|
for (var i = 0; i < pi.displays.length; ++i) {
|
||||||
children.add(InkWell(
|
children.add(InkWell(
|
||||||
onTap: () {
|
onTap: () {
|
||||||
@@ -603,13 +611,12 @@ void showOptions(
|
|||||||
decoration: BoxDecoration(
|
decoration: BoxDecoration(
|
||||||
border: Border.all(color: Theme.of(context).hintColor),
|
border: Border.all(color: Theme.of(context).hintColor),
|
||||||
borderRadius: BorderRadius.circular(2),
|
borderRadius: BorderRadius.circular(2),
|
||||||
color: i == cur
|
color: i == cur ? numBgSelected : null),
|
||||||
? Theme.of(context).primaryColor.withOpacity(0.6)
|
|
||||||
: null),
|
|
||||||
child: Center(
|
child: Center(
|
||||||
child: Text((i + 1).toString(),
|
child: Text((i + 1).toString(),
|
||||||
style: TextStyle(
|
style: TextStyle(
|
||||||
color: i == cur ? Colors.white : Colors.black87,
|
color:
|
||||||
|
i == cur ? numColorSelected : numColorUnselected,
|
||||||
fontWeight: FontWeight.bold))))));
|
fontWeight: FontWeight.bold))))));
|
||||||
}
|
}
|
||||||
displays.add(Padding(
|
displays.add(Padding(
|
||||||
|
|||||||
Reference in New Issue
Block a user