fix view mode

Signed-off-by: 21pages <pages21@163.com>
This commit is contained in:
21pages
2023-03-17 11:27:22 +08:00
parent 450a9cdb35
commit 774694714d
8 changed files with 103 additions and 91 deletions

View File

@@ -1318,7 +1318,7 @@ class _DisplayState extends State<_Display> {
Widget other(BuildContext context) {
return _Card(title: 'Other Default Options', children: [
otherRow('View Mode', 'view-only'),
otherRow('View Mode', 'view_only'),
otherRow('show_monitors_tip', 'show_monitors_toolbar'),
otherRow('Show remote cursor', 'show_remote_cursor'),
otherRow('Zoom cursor', 'zoom-cursor'),

View File

@@ -139,9 +139,8 @@ class _RemotePageState extends State<RemotePage>
_ffi.ffiModel.updateEventListener(widget.id);
_ffi.qualityMonitorModel.checkShowQualityMonitor(widget.id);
// Session option should be set after models.dart/FFI.start
// _showRemoteCursor has been set by setViewOnly
_ffi.ffiModel.setViewOnly(widget.id,
bind.sessionGetToggleOptionSync(id: widget.id, arg: 'view-only'));
_showRemoteCursor.value = bind.sessionGetToggleOptionSync(
id: widget.id, arg: 'show-remote-cursor');
_zoomCursor.value =
bind.sessionGetToggleOptionSync(id: widget.id, arg: 'zoom-cursor');
DesktopMultiWindow.addListener(this);