diff --git a/flutter_hbb/lib/common.dart b/flutter_hbb/lib/common.dart index db8f0cf41..7c3d31f77 100644 --- a/flutter_hbb/lib/common.dart +++ b/flutter_hbb/lib/common.dart @@ -21,6 +21,7 @@ class MyTheme { static const Color accent = Color(0xFF0071FF); static const Color accent50 = Color(0x770071FF); static const Color canvasColor = Color(0xFF212121); + static const Color border = Color(0xFFCCCCCC); } // https://github.com/huangjianke/flutter_easyloading diff --git a/flutter_hbb/lib/remote_page.dart b/flutter_hbb/lib/remote_page.dart index d3ccce7a6..2d1afadfd 100644 --- a/flutter_hbb/lib/remote_page.dart +++ b/flutter_hbb/lib/remote_page.dart @@ -202,16 +202,15 @@ void enterPasswordDialog(String id, BuildContext context) { labelText: 'Password', ), ), - ListTile( + CheckboxListTile( + controlAffinity: ListTileControlAffinity.leading, title: Text( 'Remember the password', ), - leading: Checkbox( - value: remember, - onChanged: (v) { - setState(() => remember = v); - }, - ), + value: remember, + onChanged: (v) { + setState(() => remember = v); + }, ), ]), [ @@ -267,11 +266,50 @@ void showOptions(String id, BuildContext context) { FFI.getByName('toggle_option', 'show-remote-cursor') == 'true'; var lockAfterSessionEnd = FFI.getByName('toggle_option', 'lock-after-session-end') == 'true'; + String quality = FFI.getByName('image_quality'); + if (quality == '') quality = 'balanced'; showAlertDialog( context, (setState) => Tuple3( null, Column(mainAxisSize: MainAxisSize.min, children: [ + RadioListTile( + controlAffinity: ListTileControlAffinity.trailing, + title: const Text('Good image quality'), + value: 'best', + groupValue: quality, + onChanged: (String value) { + setState(() { + quality = value; + FFI.setByName('image_quality', value); + }); + }, + ), + RadioListTile( + controlAffinity: ListTileControlAffinity.trailing, + title: const Text('Balanced'), + value: 'balanced', + groupValue: quality, + onChanged: (String value) { + setState(() { + quality = value; + FFI.setByName('image_quality', value); + }); + }, + ), + RadioListTile( + controlAffinity: ListTileControlAffinity.trailing, + title: const Text('Optimize reaction time'), + value: 'low', + groupValue: quality, + onChanged: (String value) { + setState(() { + quality = value; + FFI.setByName('image_quality', value); + }); + }, + ), + Divider(color: MyTheme.border), CheckboxListTile( value: showRemoteCursor, onChanged: (v) {