mirror of
https://github.com/rustdesk/rustdesk.git
synced 2024-11-28 07:39:36 +08:00
Merge pull request #3433 from fufesou/refact/canvas_pos_size
mobile, canvas size
This commit is contained in:
commit
c22043b0f9
@ -458,10 +458,8 @@ class InputModel {
|
||||
return;
|
||||
}
|
||||
evt['type'] = type;
|
||||
if (isDesktop) {
|
||||
y -= CanvasModel.topToEdge;
|
||||
x -= CanvasModel.leftToEdge;
|
||||
}
|
||||
y -= CanvasModel.topToEdge;
|
||||
x -= CanvasModel.leftToEdge;
|
||||
final canvasModel = parent.target!.canvasModel;
|
||||
final nearThr = 3;
|
||||
var nearRight = (canvasModel.size.width - x) < nearThr;
|
||||
|
@ -727,14 +727,18 @@ class CanvasModel with ChangeNotifier {
|
||||
double get scrollX => _scrollX;
|
||||
double get scrollY => _scrollY;
|
||||
|
||||
static double get leftToEdge =>
|
||||
windowBorderWidth + kDragToResizeAreaPadding.left;
|
||||
static double get rightToEdge =>
|
||||
windowBorderWidth + kDragToResizeAreaPadding.right;
|
||||
static double get topToEdge =>
|
||||
tabBarHeight + windowBorderWidth + kDragToResizeAreaPadding.top;
|
||||
static double get bottomToEdge =>
|
||||
windowBorderWidth + kDragToResizeAreaPadding.bottom;
|
||||
static double get leftToEdge => (isDesktop || isWebDesktop)
|
||||
? windowBorderWidth + kDragToResizeAreaPadding.left
|
||||
: 0;
|
||||
static double get rightToEdge => (isDesktop || isWebDesktop)
|
||||
? windowBorderWidth + kDragToResizeAreaPadding.right
|
||||
: 0;
|
||||
static double get topToEdge => (isDesktop || isWebDesktop)
|
||||
? tabBarHeight + windowBorderWidth + kDragToResizeAreaPadding.top
|
||||
: 0;
|
||||
static double get bottomToEdge => (isDesktop || isWebDesktop)
|
||||
? windowBorderWidth + kDragToResizeAreaPadding.bottom
|
||||
: 0;
|
||||
|
||||
updateViewStyle() async {
|
||||
Size getSize() {
|
||||
|
Loading…
Reference in New Issue
Block a user