scale system cursor image
Signed-off-by: fufesou <shuanglongchen@yeah.net>
This commit is contained in:
parent
06204d446e
commit
8dba394205
@ -3,7 +3,6 @@ import 'dart:io';
|
|||||||
import 'dart:ui' as ui;
|
import 'dart:ui' as ui;
|
||||||
|
|
||||||
import 'package:desktop_multi_window/desktop_multi_window.dart';
|
import 'package:desktop_multi_window/desktop_multi_window.dart';
|
||||||
import 'package:flutter/gestures.dart';
|
|
||||||
import 'package:flutter/material.dart';
|
import 'package:flutter/material.dart';
|
||||||
import 'package:flutter/services.dart';
|
import 'package:flutter/services.dart';
|
||||||
import 'package:flutter_custom_cursor/cursor_manager.dart'
|
import 'package:flutter_custom_cursor/cursor_manager.dart'
|
||||||
|
@ -1133,8 +1133,6 @@ class _RemoteMenubarState extends State<RemoteMenubar> {
|
|||||||
}());
|
}());
|
||||||
}
|
}
|
||||||
|
|
||||||
/// Show remote cursor scaling with image
|
|
||||||
if (widget.state.viewStyle.value != kRemoteViewStyleOriginal) {
|
|
||||||
displayMenu.add(() {
|
displayMenu.add(() {
|
||||||
final opt = 'zoom-cursor';
|
final opt = 'zoom-cursor';
|
||||||
final state = PeerBoolOption.find(widget.id, opt);
|
final state = PeerBoolOption.find(widget.id, opt);
|
||||||
@ -1152,7 +1150,6 @@ class _RemoteMenubarState extends State<RemoteMenubar> {
|
|||||||
dismissOnClicked: true,
|
dismissOnClicked: true,
|
||||||
);
|
);
|
||||||
}());
|
}());
|
||||||
}
|
|
||||||
|
|
||||||
/// Show quality monitor
|
/// Show quality monitor
|
||||||
displayMenu.add(MenuEntrySwitch<String>(
|
displayMenu.add(MenuEntrySwitch<String>(
|
||||||
|
@ -778,7 +778,6 @@ class CursorData {
|
|||||||
scale = 1.0;
|
scale = 1.0;
|
||||||
} else {
|
} else {
|
||||||
// Update data if scale changed.
|
// Update data if scale changed.
|
||||||
if (Platform.isWindows) {
|
|
||||||
final tgtWidth = (width * scale).toInt();
|
final tgtWidth = (width * scale).toInt();
|
||||||
final tgtHeight = (width * scale).toInt();
|
final tgtHeight = (width * scale).toInt();
|
||||||
if (tgtWidth < kMinCursorSize || tgtHeight < kMinCursorSize) {
|
if (tgtWidth < kMinCursorSize || tgtHeight < kMinCursorSize) {
|
||||||
@ -787,9 +786,7 @@ class CursorData {
|
|||||||
scale = sw < sh ? sh : sw;
|
scale = sw < sh ? sh : sw;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
|
||||||
|
|
||||||
if (Platform.isWindows) {
|
|
||||||
if (_doubleToInt(oldScale) != _doubleToInt(scale)) {
|
if (_doubleToInt(oldScale) != _doubleToInt(scale)) {
|
||||||
data = img2
|
data = img2
|
||||||
.copyResize(
|
.copyResize(
|
||||||
@ -800,7 +797,6 @@ class CursorData {
|
|||||||
)
|
)
|
||||||
.getBytes(format: img2.Format.bgra);
|
.getBytes(format: img2.Format.bgra);
|
||||||
}
|
}
|
||||||
}
|
|
||||||
|
|
||||||
this.scale = scale;
|
this.scale = scale;
|
||||||
hotx = hotxOrigin * scale;
|
hotx = hotxOrigin * scale;
|
||||||
|
Loading…
x
Reference in New Issue
Block a user