Merge branch 'master' into modern-dialog

This commit is contained in:
NicKoehler
2023-03-01 18:00:56 +01:00
parent 55831948f8
commit ab4ef977f4
88 changed files with 2293 additions and 658 deletions

View File

@@ -19,7 +19,7 @@ import 'package:flutter_hbb/desktop/widgets/scroll_wrapper.dart';
import '../../common/widgets/dialog.dart';
import '../../common/widgets/login.dart';
const double _kTabWidth = 235;
const double _kTabWidth = 200;
const double _kTabHeight = 42;
const double _kCardFixedWidth = 540;
const double _kCardLeftMargin = 15;
@@ -538,6 +538,7 @@ class _SafetyState extends State<_Safety> with AutomaticKeepAliveClientMixin {
translate('Screen Share'),
translate('Deny remote access'),
],
enabled: enabled,
initialKey: initialKey,
onChanged: (mode) async {
String modeValue;
@@ -667,6 +668,7 @@ class _SafetyState extends State<_Safety> with AutomaticKeepAliveClientMixin {
return _Card(title: 'Password', children: [
_ComboBox(
enabled: !locked,
keys: modeKeys,
values: modeValues,
initialKey: modeInitialKey,
@@ -1722,7 +1724,6 @@ class _ComboBox extends StatelessWidget {
required this.values,
required this.initialKey,
required this.onChanged,
// ignore: unused_element
this.enabled = true,
}) : super(key: key);
@@ -1735,7 +1736,12 @@ class _ComboBox extends StatelessWidget {
var ref = values[index].obs;
current = keys[index];
return Container(
decoration: BoxDecoration(border: Border.all(color: MyTheme.border)),
decoration: BoxDecoration(
border: Border.all(
color: enabled
? MyTheme.color(context).border2 ?? MyTheme.border
: MyTheme.border,
)),
height: 30,
child: Obx(() => DropdownButton<String>(
isExpanded: true,
@@ -1744,6 +1750,10 @@ class _ComboBox extends StatelessWidget {
underline: Container(
height: 25,
),
style: TextStyle(
color: enabled
? Theme.of(context).textTheme.titleMedium?.color
: _disabledTextColor(context, enabled)),
icon: const Icon(
Icons.expand_more_sharp,
size: 20,