Merge pull request #3406 from Kingtous/master

opt: resize padding for compatible ui and set the default to 5.0
This commit is contained in:
RustDesk 2023-02-27 16:56:59 +08:00 committed by GitHub
commit 47f9ed1172
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
7 changed files with 7 additions and 8 deletions

View File

@ -59,10 +59,10 @@ const double kDesktopFileTransferMaximumWidth = 300;
const double kDesktopFileTransferRowHeight = 30.0;
const double kDesktopFileTransferHeaderHeight = 25.0;
EdgeInsets get kDragToResizeAreaPadding => Platform.isLinux
EdgeInsets get kDragToResizeAreaPadding => !kUseCompatibleUiMode && Platform.isLinux
? stateGlobal.fullscreen || stateGlobal.maximize
? EdgeInsets.zero
: EdgeInsets.all(4.0)
: EdgeInsets.all(5.0)
: EdgeInsets.zero;
// https://en.wikipedia.org/wiki/Non-breaking_space
const int $nbsp = 0x00A0;

View File

@ -75,7 +75,7 @@ class _DesktopTabPageState extends State<DesktopTabPage> {
isClose: false,
),
)));
return Platform.isMacOS
return Platform.isMacOS || kUseCompatibleUiMode
? tabWidget
: Obx(
() => DragToResizeArea(

View File

@ -98,7 +98,7 @@ class _FileManagerTabPageState extends State<FileManagerTabPage> {
labelGetter: DesktopTab.labelGetterAlias,
)),
);
return Platform.isMacOS
return Platform.isMacOS || kUseCompatibleUiMode
? tabWidget
: SubWindowDragToResizeArea(
child: tabWidget,

View File

@ -107,7 +107,7 @@ class _PortForwardTabPageState extends State<PortForwardTabPage> {
labelGetter: DesktopTab.labelGetterAlias,
)),
);
return Platform.isMacOS
return Platform.isMacOS || kUseCompatibleUiMode
? tabWidget
: Obx(
() => SubWindowDragToResizeArea(

View File

@ -205,7 +205,7 @@ class _ConnectionTabPageState extends State<ConnectionTabPage> {
),
),
);
return Platform.isMacOS
return Platform.isMacOS || kUseCompatibleUiMode
? tabWidget
: Obx(() => SubWindowDragToResizeArea(
key: contentKey,

View File

@ -29,7 +29,6 @@ class StateGlobal {
setWindowId(int id) => _windowId = id;
setMaximize(bool v) {
if (_maximize != v) {
print("set maximize");
_maximize = v;
_resizeEdgeSize.value =
_maximize ? kMaximizeEdgeSize : kWindowEdgeSize;

View File

@ -59,7 +59,7 @@ dependencies:
desktop_multi_window:
git:
url: https://github.com/Kingtous/rustdesk_desktop_multi_window
ref: c717159ea8fc0b9c6b4ac50110efc1dfd3c1ba7a
ref: e383fffb5c4529c9e0a710f1025a0c590b99ee08
freezed_annotation: ^2.0.3
flutter_custom_cursor: ^0.0.4
window_size: