mirror of
https://github.com/rustdesk/rustdesk.git
synced 2024-11-27 23:19:02 +08:00
fix build
Signed-off-by: fufesou <shuanglongchen@yeah.net>
This commit is contained in:
parent
44309d861b
commit
352384646d
@ -83,7 +83,11 @@ class _DesktopTabPageState extends State<DesktopTabPage> {
|
||||
);
|
||||
return Platform.isMacOS
|
||||
? tabWidget
|
||||
: DragToResizeArea(
|
||||
resizeEdgeSize: stateGlobal.resizeEdgeSize, child: tabWidget);
|
||||
: Obx(
|
||||
() => DragToResizeArea(
|
||||
resizeEdgeSize: stateGlobal.resizeEdgeSize.value,
|
||||
child: tabWidget,
|
||||
),
|
||||
);
|
||||
}
|
||||
}
|
||||
|
@ -5,6 +5,7 @@ import 'package:desktop_multi_window/desktop_multi_window.dart';
|
||||
import 'package:flutter/material.dart';
|
||||
import 'package:flutter_hbb/common.dart';
|
||||
import 'package:flutter_hbb/consts.dart';
|
||||
import 'package:flutter_hbb/models/state_model.dart';
|
||||
import 'package:flutter_hbb/desktop/pages/file_manager_page.dart';
|
||||
import 'package:flutter_hbb/desktop/widgets/tabbar_widget.dart';
|
||||
import 'package:flutter_hbb/utils/multi_window_manager.dart';
|
||||
@ -86,7 +87,11 @@ class _FileManagerTabPageState extends State<FileManagerTabPage> {
|
||||
);
|
||||
return Platform.isMacOS
|
||||
? tabWidget
|
||||
: SubWindowDragToResizeArea(child: tabWidget);
|
||||
: SubWindowDragToResizeArea(
|
||||
child: tabWidget,
|
||||
resizeEdgeSize: stateGlobal.resizeEdgeSize.value,
|
||||
windowId: stateGlobal.windowId,
|
||||
);
|
||||
}
|
||||
|
||||
void onRemoveId(String id) {
|
||||
|
@ -5,6 +5,7 @@ import 'package:desktop_multi_window/desktop_multi_window.dart';
|
||||
import 'package:flutter/material.dart';
|
||||
import 'package:flutter_hbb/common.dart';
|
||||
import 'package:flutter_hbb/consts.dart';
|
||||
import 'package:flutter_hbb/models/state_model.dart';
|
||||
import 'package:flutter_hbb/desktop/pages/port_forward_page.dart';
|
||||
import 'package:flutter_hbb/desktop/widgets/tabbar_widget.dart';
|
||||
import 'package:flutter_hbb/utils/multi_window_manager.dart';
|
||||
@ -97,7 +98,11 @@ class _PortForwardTabPageState extends State<PortForwardTabPage> {
|
||||
);
|
||||
return Platform.isMacOS
|
||||
? tabWidget
|
||||
: SubWindowDragToResizeArea(child: tabWidget);
|
||||
: SubWindowDragToResizeArea(
|
||||
child: tabWidget,
|
||||
resizeEdgeSize: stateGlobal.resizeEdgeSize.value,
|
||||
windowId: stateGlobal.windowId,
|
||||
);
|
||||
}
|
||||
|
||||
void onRemoveId(String id) {
|
||||
|
@ -6,6 +6,7 @@ import 'package:flutter/material.dart';
|
||||
import 'package:flutter_hbb/common.dart';
|
||||
import 'package:flutter_hbb/common/shared_state.dart';
|
||||
import 'package:flutter_hbb/consts.dart';
|
||||
import 'package:flutter_hbb/models/state_model.dart';
|
||||
import 'package:flutter_hbb/desktop/pages/remote_page.dart';
|
||||
import 'package:flutter_hbb/desktop/widgets/tabbar_widget.dart';
|
||||
import 'package:flutter_hbb/utils/multi_window_manager.dart';
|
||||
@ -143,7 +144,11 @@ class _ConnectionTabPageState extends State<ConnectionTabPage> {
|
||||
);
|
||||
return Platform.isMacOS
|
||||
? tabWidget
|
||||
: SubWindowDragToResizeArea(child: tabWidget);
|
||||
: SubWindowDragToResizeArea(
|
||||
child: tabWidget,
|
||||
resizeEdgeSize: stateGlobal.resizeEdgeSize.value,
|
||||
windowId: stateGlobal.windowId,
|
||||
);
|
||||
}
|
||||
|
||||
void onRemoveId(String id) {
|
||||
|
@ -7,20 +7,22 @@ class StateGlobal {
|
||||
int _windowId = -1;
|
||||
bool _fullscreen = false;
|
||||
final RxBool _showTabBar = true.obs;
|
||||
final RxDouble _resizeEdgeSize = 8.0.obs;
|
||||
|
||||
int get windowId => _windowId;
|
||||
bool get fullscreen => _fullscreen;
|
||||
double get tabBarHeight => fullscreen ? 0 : kDesktopRemoteTabBarHeight;
|
||||
double get windowBorderWidth => fullscreen ? 0 : kWindowBorderWidth;
|
||||
RxBool get showTabBar => _showTabBar;
|
||||
double get resizeEdgeSize =>
|
||||
fullscreen ? kFullScreenEdgeSize : kWindowEdgeSize;
|
||||
RxDouble get resizeEdgeSize => _resizeEdgeSize;
|
||||
|
||||
setWindowId(int id) => _windowId = id;
|
||||
setFullscreen(bool v) {
|
||||
if (_fullscreen != v) {
|
||||
_fullscreen = v;
|
||||
_showTabBar.value = !_fullscreen;
|
||||
_resizeEdgeSize.value =
|
||||
fullscreen ? kFullScreenEdgeSize : kWindowEdgeSize;
|
||||
WindowController.fromWindowId(windowId).setFullscreen(_fullscreen);
|
||||
}
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user