mirror of
https://github.com/rustdesk/rustdesk.git
synced 2026-04-05 15:51:28 +03:00
flutter_desktop: fix layout size computation
Signed-off-by: fufesou <shuanglongchen@yeah.net>
This commit is contained in:
@@ -443,11 +443,14 @@ class ImagePaint extends StatelessWidget {
|
||||
|
||||
Widget _buildCrossScrollbar(BuildContext context, Widget child, Size size) {
|
||||
var layoutSize = MediaQuery.of(context).size;
|
||||
// If minimized, w or h may be negative here.
|
||||
final w = layoutSize.width - kWindowBorderWidth * 2;
|
||||
final h =
|
||||
layoutSize.height - kWindowBorderWidth * 2 - kDesktopRemoteTabBarHeight;
|
||||
layoutSize = Size(
|
||||
layoutSize.width - kWindowBorderWidth * 2,
|
||||
layoutSize.height -
|
||||
kWindowBorderWidth * 2 -
|
||||
kDesktopRemoteTabBarHeight);
|
||||
w < 0 ? 0 : w,
|
||||
h < 0 ? 0 : h,
|
||||
);
|
||||
bool overflow =
|
||||
layoutSize.width < size.width || layoutSize.height < size.height;
|
||||
return overflow
|
||||
|
||||
Reference in New Issue
Block a user