summaryrefslogtreecommitdiffstats
path: root/src/gui
Commit message (Collapse)AuthorAgeFilesLines
...
| | * Restore High DPI scale factorsFriedemann Kleint2020-01-071-3/+3
| | | | | | | | | | | | | | | | | | | | | | | | | | | Change the default rounding policy to "Round" so that 2 is used for 150% (144DPI) on Windows, as it was in 5.13. Fixes: QTBUG-80934 Change-Id: I0cba986ce6afc9e2737c656000ad854c07844360 Reviewed-by: Morten Johan Sørvig <morten.sorvig@qt.io>
* | | Merge remote-tracking branch 'origin/5.15' into devQt Forward Merge Bot2020-01-091-4/+2
|\| | | | | | | | | | | Change-Id: I7be168303fc4fec5892f20f8dcbdf1bdfcd4986f
| * | Merge remote-tracking branch 'origin/5.14' into 5.15Qt Forward Merge Bot2020-01-071-4/+2
| |\| | | | | | | | | | Change-Id: I6c81e3cb6272adc5c3de2513792bd48604ff4dd0
| | * QTextDocument: Set the font family to be after the families setAndy Shaw2020-01-061-4/+2
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This amends a1f4321bbba2f3bff24d753ce766be738dbfa61a as the font families should take precedence over the font family set. If the font family is already included in the families then it should keep its placement. Otherwise it should be appended. Task-number: QTBUG-80475 Change-Id: I0049189c88b6879e57619815ec780960e9c0a300 Reviewed-by: Ulf Hermann <ulf.hermann@qt.io> Reviewed-by: Eskil Abrahamsen Blomfeldt <eskil.abrahamsen-blomfeldt@qt.io>
* | | Merge remote-tracking branch 'origin/5.15' into devFriedemann Kleint2020-01-0724-376/+81
|\| | | | | | | | | | | Change-Id: Ia2ce994c42adc010c453edaeea57f672556958f6
| * | Merge "Merge remote-tracking branch 'origin/5.14' into 5.15"Qt Forward Merge Bot2020-01-063-27/+19
| |\ \
| | * | Merge remote-tracking branch 'origin/5.14' into 5.15Qt Forward Merge Bot2020-01-063-27/+19
| | |\| | | | | | | | | | | | | | | | | | | | | | | | | Conflicts: src/corelib/kernel/qvariant.h Change-Id: I8f3873e74b9795ac889e7c7ec5de2619bca92160
| | | * Fix semi-transparent text on Linux with subpixel anti-aliasingAllan Sandfeld Jensen2020-01-051-1/+5
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | The newly optimized rgbBlend function wasn't updated to handle SourceOver compositing when dealing with semi-transparent text color. The extra composition isn't SIMD optimized but short-cut for all opaque colors. Fixes: QTBUG-80982 Change-Id: I88c1e60fd5e80a8c7f9e6b0e7de8248c7c00ebc2 Reviewed-by: Eskil Abrahamsen Blomfeldt <eskil.abrahamsen-blomfeldt@qt.io>
| | | * QTextDocument: Give fontFamily() precedence over fontFamilies()Ulf Hermann2020-01-022-26/+14
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | If the singular fontFamily() is given, then this is obviously the one to be preferred over any plural fontFamilies(). Make sure it always ends up first in the list of emitted font families. Change-Id: I1e3b1ba29721c8298b1a0d4a1e1da49ba5b4e7ac Fixes: QTBUG-80475 Reviewed-by: Lars Knoll <lars.knoll@qt.io>
| * | | RHI: Remove old native texture APIPaul Olav Tvete2020-01-0617-280/+7
| | | | | | | | | | | | | | | | | | | | | | | | Task-number: QTBUG-78570 Change-Id: I8c4850828ac03319ac923a26c2e985883956c286 Reviewed-by: Laszlo Agocs <laszlo.agocs@qt.io>
| * | | Add environment variables for customizing VulkanPaul Olav Tvete2020-01-062-0/+20
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | QT_VULKAN_INSTANCE_EXTENSIONS to specify additional instance extensions. QT_VULKAN_INSTANCE_LAYERS to specify additional instance layers. QT_VULKAN_DEVICE_EXTENSIONS to specify additional device extensions. These will apply to all QVulkanWindows and everything that uses RHI, including Qt Quick with the Vulkan RHI backend. Task-number: QTBUG-80499 Change-Id: I912495affa987d62a9823d55d06d6a8209f6adc6 Reviewed-by: Laszlo Agocs <laszlo.agocs@qt.io>
| * | | Modernize setAlphaChannel(), and deprecated alphaChannel()Allan Sandfeld Jensen2020-01-052-67/+32
| |/ / | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | The two methods have been marked obsolete for a very long time, setAlphaChannel() is still convenient though, so this patch modernizes it and removes obsolete from the API, while marking QImage::alphaChannel() as deprecated. They don't work as getter and setter anyway, since setAlphaChannel() actually does an alpha composition. Change-Id: I634d6463f78c42bb9c5fa3df17500ec01bfcac33 Reviewed-by: Eirik Aavitsland <eirik.aavitsland@qt.io>
* | | Merge remote-tracking branch 'origin/5.15' into devLiang Qi2020-01-0436-1116/+1011
|\| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Conflicts: src/corelib/tools/qvector.h Make QVector(DataPointer dd) public to be able to properly merge 5b4b437b30b320e2cd7c9a566999a39772e5d431 from 5.15 into dev. src/widgets/kernel/qapplication.cpp tests/auto/tools/moc/allmocs_baseline_in.json Done-With: Christian Ehrlicher <ch.ehrlicher@gmx.de> Change-Id: I929ba7c036d570382d0454c2c75f6f0d96ddbc01
| * | Merge remote-tracking branch 'origin/5.14' into 5.15Qt Forward Merge Bot2019-12-276-13/+25
| |\| | | | | | | | | | | | | | | | | | | | | | | | | Conflicts: .qmake.conf src/plugins/platforms/xcb/qxcbscreen.cpp src/widgets/accessible/qaccessiblewidget.cpp Change-Id: Ib3138e61ba7981610940509a7ff02ba2dd281bf0
| | * Don’t reset highDpicaleFactorRoundingPolicyMorten Johan Sørvig2019-12-191-2/+0
| | | | | | | | | | | | | | | | | | | | | | | | | | | Don’t reset highDpicaleFactorRoundingPolicy in the QGuiApplication destructior. This is a static property, independent of the application object lifetime. Change-Id: Ibf55e2a6ea1ae6429fce3f0e9d58323111aac374 Reviewed-by: Tor Arne Vestbø <tor.arne.vestbo@qt.io>
| | * High-DPI: restore rounding behavior on AndroidMorten Johan Sørvig2019-12-191-0/+8
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Qt 5.14 introduced QApplication::scaleFactorRoundingPolicy, where the default policy rounds the scale factor to an integer, which matches Qt's behavior on Windows and X11. However, Qt has never rounded scale factors on Android. Restore the historical behavior and document the platform difference. Change-Id: I0f8e8fb65e3874338ea290bbb12da350da22f099 Reviewed-by: Tor Arne Vestbø <tor.arne.vestbo@qt.io>
| | * macOS: Deliver theme changes synchronouslyTor Arne Vestbø2019-12-192-2/+3
| | | | | | | | | | | | | | | | | | | | | | | | | | | Otherwise the expose event that AppKit triggers will be delivered before we've propagated the theme change, and we fail to draw the UI using the new theme. Change-Id: I502122a2bf02a866d136106d831f0c2a0dfe26f2 Reviewed-by: Timur Pocheptsov <timur.pocheptsov@qt.io>
| | * Doc: Add since versionPaul Wicking2019-12-191-0/+2
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | for QCursor::swap and QOperatingSystemVersion::currentType. Fixes: QTBUG-80854 Fixes: QTBUG-80891 Change-Id: Ia256fa0d3ad4665f44b933f5a4a8d4ee87e9fc13 Reviewed-by: Timur Pocheptsov <timur.pocheptsov@qt.io> Reviewed-by: Leena Miettinen <riitta-leena.miettinen@qt.io>
| | * Sync implementation of QGuiApplication and QApplication setPaletteTor Arne Vestbø2019-12-171-3/+4
| | | | | | | | | | | | | | | | | | | | | | | | | | | The two static setPalette methods in QApplication and QGuiApplication should have the same behavior in terms of what signals and events they emit. Change-Id: I54579d490e31f3783e2d4fea689ca799a070ff1d Reviewed-by: Timur Pocheptsov <timur.pocheptsov@qt.io>
| | * Let sendApplicationPaletteChange() decide when it needs to exit earlyTor Arne Vestbø2019-12-171-2/+4
| | | | | | | | | | | | | | | Change-Id: I7a8e6c0b54d2a16a17b292a4102e05f743bcbe29 Reviewed-by: Timur Pocheptsov <timur.pocheptsov@qt.io>
| | * Remove ApplicationResourceFlags::ApplicationPaletteExplicitlySetTor Arne Vestbø2019-12-171-4/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | After 8fb881900c7b it's tracked by AA_SetPalette. Since the latter is publicly observable we remove the internal flag instead. Change-Id: Ie69799f1b45d68017cb9eaab2a9986cc9ac9ca38 Reviewed-by: Timur Pocheptsov <timur.pocheptsov@qt.io> Reviewed-by: Friedemann Kleint <Friedemann.Kleint@qt.io>
| | * Fix QPainter::drawLines() with cosmetic penEirik Aavitsland2019-12-171-0/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Even though each line in the array passed to drawLines() should be rendered as an independent line, some state was kept in the cosmetic stroker from one line to the next. This could result in visible rendering errors. Fixes: QTBUG-80834 Change-Id: Ief7bf78eab83ae34459802bff5a57d6beec4a5e5 Reviewed-by: Allan Sandfeld Jensen <allan.jensen@qt.io>
| | * QTextDocument: compile with QT_NO_PRINTERChristian Ehrlicher2019-12-161-0/+2
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | The implementation of QTextDocument::print() is not available when QT_NO_PRINTER is defined but the declaration was so when someone is using this function (and QT_NO_PRINTER) a linker error will occur. Fixes: QTBUG-56916 Change-Id: I49aaaa643c4d8587a66fc95733060cea11994872 Reviewed-by: Volker Hilsheimer <volker.hilsheimer@qt.io>
| * | New features for QPdfWriterJordi Pujol Foyo2019-12-194-33/+196
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Added new API setDocumentXmpMetadata/documentXmpMetadata and addFileAttachment [ChangeLog][QtGui][QPdfWriter] New API to provide external document XMP metadata and attach files to PDF. Fixes: QTBUG-78651 Fixes: QTBUG-78764 Change-Id: Ic0b37e8d12899f907001db469080594c14c87655 Reviewed-by: Eirik Aavitsland <eirik.aavitsland@qt.io>
| * | QWindowSystemInterface: use QBasicMutex and qt_scoped_lockMarc Mutz2019-12-182-5/+6
| | | | | | | | | | | | | | | | | | | | | | | | | | | There's no reason to use a class-static mutex object here. Use a namespace-static QBasicMutex, port to qt_scoped_lock. Change-Id: Ia9bd3c2fadbf1da25ef79bb393c899b678cbc182 Reviewed-by: Tor Arne Vestbø <tor.arne.vestbo@qt.io>
| * | Merge "Merge remote-tracking branch 'origin/5.14' into 5.15"Liang Qi2019-12-164-3/+4
| |\ \
| | * | Merge remote-tracking branch 'origin/5.14' into 5.15Liang Qi2019-12-164-3/+4
| | |\| | | | | | | | | | | | | | | | | | | | | | | | | | | | | Conflicts: src/network/ssl/qsslsocket.cpp src/widgets/kernel/qapplication.cpp Change-Id: Ib7421cc2df59d0969f89b3fbd65a17ea76ffef3b
| | | * Use pkg-config to find libjpegMarius Kittler2019-12-151-0/+1
| | | | | | | | | | | | | | | | | | | | Change-Id: I42d877fbca5d746114cc28f8ee4db3e54754cd24 Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
| | | * OpenGL: Fix signature of GLDEBUGPROC in qopenglextrafunctions.hAlexandru Croitor2019-12-131-1/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | The typedef "QOPENGLF_APIENTRYP" was incompatible to the one in "src/opengl/qopengldebug.cpp" which used "QOPENGLF_APIENTRY". Note the misisng "P " ending. The type is meant to be a function pointer, not a pointer to a function pointer, so remove the extra P. Change-Id: I229b73ca8e7367f88a2b48e2728e615605f02da3 Reviewed-by: Laszlo Agocs <laszlo.agocs@qt.io>
| | | * Doc: Fix qdoc compilation errors qtbaseNico Vertriest2019-12-122-2/+2
| | | | | | | | | | | | | | | | | | | | | | | | Task-number: QTBUG-79824 Change-Id: I6557de598de1931fc30556951d35783d02b83abe Reviewed-by: Paul Wicking <paul.wicking@qt.io>
| * | | Avoid crashing when constructing color-space from invalid enumAllan Sandfeld Jensen2019-12-161-0/+4
| |/ / | | | | | | | | | | | | | | | | | | | | | This is not to be taken as supported and is still undefined behavior, but I prefer we do not crash. Change-Id: Icf4f3398bfd57fcbdc611a5a821a1f2de0838330 Reviewed-by: Eirik Aavitsland <eirik.aavitsland@qt.io>
| * | Replace usages of QVariant::value by qvariant_castOlivier Goffart2019-12-155-13/+13
| | | | | | | | | | | | | | | | | | | | | This is done automatically with a clazy check Change-Id: I3b59511d3d36d416c8eda74858ead611d327b116 Reviewed-by: Lars Knoll <lars.knoll@qt.io>
| * | WebGradients: redo implementationGiuseppe D'Angelo2019-12-148-1006/+600
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | The previous implementation was *extremely* expensive. It relied on loading a binary JSON file from resources (which involved decompressing it), then extracting information out of it to build a gradient. Already-loaded gradients were kept in a local cache, which had to be mutex protected. Instead, this patch extends the gradient generator to build static arrays filled with the web gradient data, sitting in .rodata. These arrays are used when building QGradient objects with a web gradient. No explicit mutex protection is necessary, since accesses will just read from the arrays. As benefits, this patch removes: * the binary json representation from QtGui's resources (~4KB compressed, ~50KB uncompressed) * the overhead of reading from the JSON for each used web gradient; * the startup costs of registering the webgradients in the resources; * all the overhead of mutex locking when building such gradients; * all the runtime memory allocations to load, parse and cache the web gradients (including the memory + CPU spike on first load due to the uncompression of the JSON data, as well as a couple of deep copies). Change-Id: If5c3d704430df76ce8faf55ee75ebd4639ba09c4 Reviewed-by: Tor Arne Vestbø <tor.arne.vestbo@qt.io> Reviewed-by: Ulf Hermann <ulf.hermann@qt.io> Reviewed-by: Qt CI Bot <qt_ci_bot@qt-project.org> Reviewed-by: Thiago Macieira <thiago.macieira@intel.com> Reviewed-by: Edward Welbourne <edward.welbourne@qt.io>
| * | QStandardItemModel: do not reset persisten index in setItem()Christian Ehrlicher2019-12-141-1/+10
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | When an existing item is replaced with a new one in QStandardItemModel::setItem() then the persitent index is invalidated which leads to some unexpected behaviors (like e.g the header size and resize mode are reset). Therefore we have to make sure that the invalidation does not happen. This can be achieved by delaying the call to QStandardItem::setModel() for the old item until the new is properly added. After this, the old item no longer gets a valid QModelIndex from the model and therefore can't invalidate the persistent index anymore. Fixes: QTBUG-13605 Fixes: QTBUG-73000 Fixes: QTBUG-80586 Change-Id: I4e45e6feb81b7287c0859f638d7ab1a576fc2f0f Reviewed-by: David Faure <david.faure@kdab.com>
| * | QTextDocument: Change use of QMap::unite to QMap::insertMårten Nordheim2019-12-121-1/+1
| | | | | | | | | | | | | | | | | | | | | | | | None of the code I could see handles the map like a multimap. Change-Id: I9d51da6dafed4317e801703599e83fb038c22a1d Reviewed-by: Volker Hilsheimer <volker.hilsheimer@qt.io> Reviewed-by: Lars Knoll <lars.knoll@qt.io>
| * | rhi: gl: Add support for arrays of float, vec2, vec3 and vec4Laszlo Agocs2019-12-122-10/+70
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This is a thing in Qt Quick: there are some types of image particles that use uniforms like "float opacitytable[64]". This should make all views work correctly in the Image Particles example when running on the OpenGL backend of QRhi. (other backends should work as expected already) Change-Id: I64a04fbb98b97d81d257b00b428582e751d46b8e Fixes: QTBUG-80667 Reviewed-by: Paul Olav Tvete <paul.tvete@qt.io>
| * | rhi: metal: Skip inactive resourcesLaszlo Agocs2019-12-122-30/+81
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | The Quick3D-on-RHI PoC demonstrates a case which the Metal backend fails to handle correctly: have an object with a lighting-enabled material, but remove all lights from the scene. Under the hood this means having a uniform block in the shader, but without referencing it in any way in the actual shader code. This leads to the resource being present (as far as shader reflection is concerned), but with no native binding point available, meaning the attempt to retrieve the Metal binding point for it returns -1, and that is what the QShader carries in the nativeResourceBindingMap. The backend should be prepared to silently skip the resource, whereas currently we end up in an assertion due to attempting to batch the (native) binding "-1", which is invalid. Correct this. Change-Id: I85ee58145f589aca45d46c23e0cdce837d598850 Fixes: QTBUG-80668 Reviewed-by: Paul Olav Tvete <paul.tvete@qt.io>
| * | Avoid initializing QFlags with 0 or nullptr in macOS-specific codeFriedemann Kleint2019-12-111-1/+1
| | | | | | | | | | | | | | | | | | | | | It is being deprecated. Change-Id: If1b0b058140e197d41efae93025c4eefc2ed9bbd Reviewed-by: Allan Sandfeld Jensen <allan.jensen@qt.io>
* | | Remove QOpenGLTexture dependency from QTextureFileDataJohan Klokkhammer Helsing2020-01-031-11/+1
| | | | | | | | | | | | | | | | | | | | | | | | Just print the hex value of the format. Task-number: QTBUG-74409 Change-Id: I0441eda050735325f7686532b17ef765f71bec9b Reviewed-by: Paul Olav Tvete <paul.tvete@qt.io>
* | | QPalette: fix debug stream operatorVitaly Fanaskov2020-01-031-26/+50
| | | | | | | | | | | | | | | | | | | | | | | | | | | Current implementation takes both color group and color role into account. Code readability is also improved. Fixes: QTBUG-78544 Change-Id: Ibfa925f3e4cb0be89915607eee142926e05000b5 Reviewed-by: Friedemann Kleint <Friedemann.Kleint@qt.io>
* | | Fix QPalette::isBrushSetVitaly Fanaskov2020-01-022-39/+82
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | The previous implementation did not take into account different color groups in resolve mask. It led to some issues when resolving a palette or checking whether a brush is set or not. Task-number: QTBUG-78544 Change-Id: I9b67b2c444eb62c022643022a874dc400005e6ee Reviewed-by: Tor Arne Vestbø <tor.arne.vestbo@qt.io> Reviewed-by: Shawn Rutledge <shawn.rutledge@qt.io>
* | | QPalette::setBrush: remove a workaround for PlaceholderTextVitaly Fanaskov2019-12-181-26/+7
| | | | | | | | | | | | | | | | | | | | | | | | | | | This partially reverts ebd3a13b807c6af2684b42d3912549caf7ef82aa removing the part that was intended to be removed in Qt 6. Task-number: QTBUG-78544 Change-Id: I4b7eb922c46e44411717f80234fad8ad7dd09aef Reviewed-by: Shawn Rutledge <shawn.rutledge@qt.io>
* | | Basic QImage cleanupAllan Sandfeld Jensen2019-12-183-302/+1
| | | | | | | | | | | | | | | | | | | | | Remove deprecated methods and do marked TODOs for Qt6. Change-Id: I905743cf909776c6433616b3a7c3b544d75f2afe Reviewed-by: Eirik Aavitsland <eirik.aavitsland@qt.io>
* | | Move QOpenGLTimerQuery to from QtGui to QtOpenGLJohan Klokkhammer Helsing2019-12-124-1187/+2
| | | | | | | | | | | | | | | | | | Task-number: QTBUG-74409 Change-Id: Ic8ef0a814700b2ed76b661d560907ad498334231 Reviewed-by: Laszlo Agocs <laszlo.agocs@qt.io>
* | | Merge "Merge remote-tracking branch 'origin/5.15' into dev"Qt Forward Merge Bot2019-12-118-20/+105
|\ \ \
| * | | Merge remote-tracking branch 'origin/5.15' into devQt Forward Merge Bot2019-12-118-20/+105
| |\| | | | | | | | | | | | | | | | | | | | | | | | | | Conflicts: tests/auto/sql/kernel/qsqlquery/tst_qsqlquery.cpp Change-Id: I6b82507bf9a80a374c40393e72f4843f1557de89
| | * | rhi: gl: Handle struct and array of struct uniformsLaszlo Agocs2019-12-102-13/+63
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | We have intentionally limited support for advanced things like arrays in a uniform block. There is one very common case however: a one dimensional array of a struct. Typical example for Qt Quick 3D: struct LightSource { vec4 position; ... }; layout (std140, binding = 1) uniform cbBufferLights { int uNumLights; LightSource lights[MAX_NUM_LIGHTS]; }; With GLSL (uniform blocks disabled) this gets turned into two structs where one has a 'lights' member that is an array of the other struct. Teach the OpenGL backend of QRhi how to handle this. This makes the QRhi port of Qt Quick3D functional with the OpenGL backend as well. Change-Id: I6a09b93276794f7ecdd38f5bfbd3491a9ef58146 Fixes: QTBUG-80628 Reviewed-by: Christian Strømme <christian.stromme@qt.io>
| | * | rhi: gl: Destructure mat3 correctlyLaszlo Agocs2019-12-101-1/+9
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | As per std140 packing rules. Change-Id: I85663d36a9fa617ea387e8f201677471b2ebd948 Fixes: QTBUG-80655 Reviewed-by: Christian Strømme <christian.stromme@qt.io>
| | * | Merge remote-tracking branch 'origin/5.14' into 5.15Liang Qi2019-12-106-6/+33
| | |\| | | | | | | | | | | | | | | | | | | | | | | | | Conflicts: tests/auto/network/kernel/qnetworkinterface/BLACKLIST Change-Id: I1e8866c63b54bcd95fc2a044276ee15b7f60e79a
| | | * Move the tooltip out of the way of very large mouse cursorsVolker Hilsheimer2019-12-092-0/+9
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Users that have large mouse pointers configured in their settings can not see tooltips, as they are obscured by the pointer. Native applications on Windows and macOS have the same problem, which includes the tooltips for the minimize/maximize/close controls in the window frame of e.g. Explorer. Introduce QPlatformCursor::size that returns a value that is based on the user's settings, or a default value. We can then use that value to move the tooltip out of the way. On Windows, the calculation of the cursor size is based on experimenting with the settings, which are in logical independent pixels. The placement of the tooltip attempts to keep existing behavior, and to not end up with a tooltip that's very far away from the tip of the arrow even for very large mouse cursors. [ChangeLog][QtWidgets][QToolTip] Make sure that the tooltip is not obscured by very large mouse pointers on Windows and macOS. Change-Id: I8e13b7a166bfe8b59cef4765c950f90fefeaef9d Fixes: QTBUG-79627 Reviewed-by: Friedemann Kleint <Friedemann.Kleint@qt.io> Reviewed-by: Morten Johan Sørvig <morten.sorvig@qt.io>