Reduce call grabToImage()

This commit is contained in:
reionwong 2021-08-28 17:35:05 +08:00
parent 4848c06e2f
commit b0864bff80
2 changed files with 3 additions and 2 deletions

View file

@ -117,7 +117,7 @@ Item {
onPositionChanged: {
if (pressed) {
if (mouse.source !== Qt.MouseEventSynthesizedByQt) {
if (control.draggable && mouse.source !== Qt.MouseEventSynthesizedByQt) {
drag.target = icon
icon.grabToImage(function(result) {
control.Drag.imageSource = result.url

View file

@ -29,7 +29,8 @@
int main(int argc, char *argv[])
{
QCoreApplication::setAttribute(Qt::AA_EnableHighDpiScaling);
QCoreApplication::setAttribute(Qt::AA_EnableHighDpiScaling, true);
QCoreApplication::setAttribute(Qt::AA_UseHighDpiPixmaps, true);
QApplication app(argc, argv);
qmlRegisterType<DockSettings>("Cutefish.Dock", 1, 0, "DockSettings");