Reduce call grabToImage()
This commit is contained in:
parent
4848c06e2f
commit
b0864bff80
2 changed files with 3 additions and 2 deletions
|
@ -117,7 +117,7 @@ Item {
|
||||||
|
|
||||||
onPositionChanged: {
|
onPositionChanged: {
|
||||||
if (pressed) {
|
if (pressed) {
|
||||||
if (mouse.source !== Qt.MouseEventSynthesizedByQt) {
|
if (control.draggable && mouse.source !== Qt.MouseEventSynthesizedByQt) {
|
||||||
drag.target = icon
|
drag.target = icon
|
||||||
icon.grabToImage(function(result) {
|
icon.grabToImage(function(result) {
|
||||||
control.Drag.imageSource = result.url
|
control.Drag.imageSource = result.url
|
||||||
|
|
|
@ -29,7 +29,8 @@
|
||||||
|
|
||||||
int main(int argc, char *argv[])
|
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);
|
QApplication app(argc, argv);
|
||||||
|
|
||||||
qmlRegisterType<DockSettings>("Cutefish.Dock", 1, 0, "DockSettings");
|
qmlRegisterType<DockSettings>("Cutefish.Dock", 1, 0, "DockSettings");
|
||||||
|
|
Loading…
Reference in a new issue