set image center when remote resolution is changed

Signed-off-by: fufesou <shuanglongchen@yeah.net>
This commit is contained in:
fufesou
2023-01-10 17:13:40 +08:00
parent c7fd38ed23
commit a3643f53bf
8 changed files with 34 additions and 22 deletions

View File

@@ -4,6 +4,7 @@ import 'dart:io';
import 'package:flutter/material.dart';
import 'package:flutter_hbb/common.dart';
import 'package:flutter_hbb/consts.dart';
import 'package:get/get.dart';
import 'package:path/path.dart' as path;
@@ -347,7 +348,7 @@ class FileModel extends ChangeNotifier {
id: parent.target?.id ?? "", name: "remote_show_hidden"))
.isNotEmpty;
_remoteOption.isWindows =
parent.target?.ffiModel.pi.platform.toLowerCase() == "windows";
parent.target?.ffiModel.pi.platform == kPeerPlatformWindows;
await Future.delayed(Duration(milliseconds: 100));

View File

@@ -61,7 +61,7 @@ class FfiModel with ChangeNotifier {
bool get touchMode => _touchMode;
bool get isPeerAndroid => _pi.platform == 'Android';
bool get isPeerAndroid => _pi.platform == kPeerPlatformAndroid;
set inputBlocked(v) {
_inputBlocked = v;
@@ -238,6 +238,11 @@ class FfiModel with ChangeNotifier {
if ((_display.width > _display.height) != oldOrientation) {
gFFI.canvasModel.updateViewStyle();
}
if (_pi.platform == kPeerPlatformLinux ||
_pi.platform == kPeerPlatformWindows ||
_pi.platform == kPeerPlatformMacOS) {
parent.target?.canvasModel.updateViewStyle();
}
parent.target?.recordingModel.onSwitchDisplay();
notifyListeners();
}