client side view mode

Signed-off-by: 21pages <pages21@163.com>
This commit is contained in:
21pages
2023-03-16 09:37:35 +08:00
parent 51bb83cd8c
commit 0e05df12fc
43 changed files with 203 additions and 46 deletions

View File

@@ -1318,6 +1318,7 @@ class _DisplayState extends State<_Display> {
Widget other(BuildContext context) {
return _Card(title: 'Other Default Options', children: [
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,8 +139,9 @@ 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.value = bind.sessionGetToggleOptionSync(
id: widget.id, arg: 'show-remote-cursor');
// _showRemoteCursor has been set by setViewOnly
_ffi.ffiModel.setViewOnly(widget.id,
bind.sessionGetToggleOptionSync(id: widget.id, arg: 'view-only'));
_zoomCursor.value =
bind.sessionGetToggleOptionSync(id: widget.id, arg: 'zoom-cursor');
DesktopMultiWindow.addListener(this);