Skip to content

Commit

Permalink
fix: scale ratio
Browse files Browse the repository at this point in the history
  • Loading branch information
letrungdo committed Sep 27, 2024
1 parent 475f96f commit b715c98
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion windows/flutter_window.h
Original file line number Diff line number Diff line change
Expand Up @@ -106,7 +106,8 @@ class FlutterWindow : public BaseFlutterWindow {
sz->rgrc[0].left -= l;
sz->rgrc[0].top -= t;
sz->rgrc[0].right += l;
sz->rgrc[0].bottom += t;
// + (int)ceil(pixel_ratio_) for fix https://github.com/rustdesk/rustdesk/issues/9481#issuecomment-2378509607
sz->rgrc[0].bottom += (l + (int)ceil(pixel_ratio_));
}
};

Expand Down

2 comments on commit b715c98

@fufesou
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

sz->rgrc[0].bottom - sz->rgrc[0].top will affect the size of the media query.

See leanflutter/window_manager#477 (comment)

sz->rgrc[0].bottom += (l + (int)ceil(pixel_ratio_)); might just be a not-very-good workaround.

@letrungdo
Copy link
Collaborator Author

@letrungdo letrungdo commented on b715c98 Sep 27, 2024

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@fufesou Thank you for your review, I have fixed it in a new way in the following PR. Please check

Please sign in to comment.