mirror of
https://github.com/rustdesk/rustdesk.git
synced 2026-04-12 11:51:27 +03:00
mobile handle orientation change
This commit is contained in:
@@ -33,6 +33,7 @@ class _RemotePageState extends State<RemotePage> {
|
||||
String _value = '';
|
||||
double _scale = 1;
|
||||
double _mouseScrollIntegral = 0; // mouse scroll speed controller
|
||||
Orientation? _currentOrientation;
|
||||
|
||||
var _more = true;
|
||||
var _fn = false;
|
||||
@@ -258,12 +259,22 @@ class _RemotePageState extends State<RemotePage> {
|
||||
color: Colors.black,
|
||||
child: isDesktop
|
||||
? getBodyForDesktopWithListener(keyboard)
|
||||
: SafeArea(
|
||||
child: Container(
|
||||
: SafeArea(child:
|
||||
OrientationBuilder(builder: (ctx, orientation) {
|
||||
if (_currentOrientation != orientation) {
|
||||
debugPrint("on orientation changed");
|
||||
Timer(Duration(milliseconds: 200), () {
|
||||
resetMobileActionsOverlay();
|
||||
_currentOrientation = orientation;
|
||||
FFI.canvasModel.updateViewStyle();
|
||||
});
|
||||
}
|
||||
return Container(
|
||||
color: MyTheme.canvasColor,
|
||||
child: _isPhysicalMouse
|
||||
? getBodyForMobile()
|
||||
: getBodyForMobileWithGesture())));
|
||||
: getBodyForMobileWithGesture());
|
||||
})));
|
||||
})
|
||||
],
|
||||
))),
|
||||
|
||||
Reference in New Issue
Block a user