Previously scale factor for zoom in/out was calculated as
$(currentScaleFactor)^1.2
This results in weird zoom levels such as 83.3% or 144%. Replace this
approach with using pre-defined set of 'normal' zoom level values
such as {25%, 50%, .. 100%, 150%, 200% .. }, similar to what most
graphic editors do
To find the nearest greater or lesser fixed zoom level for any given
floating point scale factor I borrowed some code from qmldesigner/
timelinewidget
I didn't know what to do with zooming using mouse wheel so I left the
old code in place
Change-Id: Id037ef99f89cce5e8dcd58bb9ad0e6f3c8536f36
Reviewed-by: Alessandro Portale <alessandro.portale@qt.io>
Reviewed-by: Qt CI Bot <qt_ci_bot@qt-project.org>
Reviewed-by: <github-actions-qt-creator@cristianadam.eu>
Interactive QGraphicsViews eat all drag&drop events. Since we don't want
the view to be "interactive" anyhow, just set it to non-interactive.
Dragging the image around if it is larger than the view is not
implemented via drag&drop events, so it still works.
Fixes: QTCREATORBUG-25462
Change-Id: Iee403bab7ba83f897b4d2cca662c4e82ae4aa529
Reviewed-by: Robert Löhning <robert.loehning@qt.io>
Reviewed-by: David Schulz <david.schulz@qt.io>
General messages pane should only be opened on direct user interaction.
Task-number: QTCREATORBUG-24430
Change-Id: Ib4c72b1bb07c27aabc74eb62c56061d5548b677d
Reviewed-by: David Schulz <david.schulz@qt.io>
Replaced the usages of deprecated QWheelEvent::delta() with
QWheelEvent::angleDelta().y(), assuming that it's acceptable to use only the
vertical component of angle delta.
Task-number: QTBUG-76491
Change-Id: I4aa0a5a0e9ba7f33321bdb879b66ffb589b53e42
Reviewed-by: Eike Ziller <eike.ziller@qt.io>
Add a second SVG export option that allows for exporting
a series of icons of various size in one go. A dialog is shown
that allows for entering a file name pattern with place holders
and a list of sizes.
Change-Id: Ic644a9d402aa44af5899c29cf83051fdd7bba3d1
Reviewed-by: Leena Miettinen <riitta-leena.miettinen@qt.io>
Reviewed-by: Diana de Sousa <diana.desousa@theqtcompany.com>
Reviewed-by: Alessandro Portale <alessandro.portale@qt.io>
Add a tool button showing a dialog with file name
and size for exporting images from SVG.
[ChangeLog][ImageViewer] Added option to export images from SVG.
Change-Id: I84e04dc166e70b0359eba0f19703a75b882a2bc2
Reviewed-by: Leena Miettinen <riitta-leena.miettinen@theqtcompany.com>
Reviewed-by: Alessandro Portale <alessandro.portale@theqtcompany.com>
The imageViewer currently always renders the images smooth/interpolated.
When loading an image in an IDE and zooming in, I usually do that in
order to examine the details on pixel level. Therefore, I believe that
smoothing/interpolation should be turned off with a scalefactor >= 1.
This patch does that for images and movies. Svg files remain always
smooth.
Change-Id: I327583b1f46132d179a1e0425f146106d962377b
Reviewed-by: Daniel Teske <daniel.teske@digia.com>
Getting the #include directives ready for Qt5. This includes the
new-project wizards.
Change-Id: Ia9261f1e8faec06b9285b694d2b7e9a095978d2b
Reviewed-by: Eike Ziller <eike.ziller@nokia.com>