From 643d75e3ff2f8cbe60eeff2084fb6ec3fcb096a0 Mon Sep 17 00:00:00 2001 From: Frederik Schwarzer Date: Wed, 21 Sep 2016 16:13:00 +0200 Subject: QQuickRectangle: fix typo in apidoc Change-Id: Ib026302143df82196fdfd70b9ea9923098adbc7c Reviewed-by: Robin Burchell --- src/quick/items/qquickrectangle.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'src/quick/items') diff --git a/src/quick/items/qquickrectangle.cpp b/src/quick/items/qquickrectangle.cpp index eb17187ad5..ab22fceee1 100644 --- a/src/quick/items/qquickrectangle.cpp +++ b/src/quick/items/qquickrectangle.cpp @@ -360,7 +360,7 @@ QQuickPen *QQuickRectangle::border() The gradient to use to fill the rectangle. This property allows for the construction of simple vertical gradients. - Other gradients may by formed by adding rotation to the rectangle. + Other gradients may be formed by adding rotation to the rectangle. \div {class="float-left"} \inlineimage declarative-rect_gradient.png -- cgit v1.2.3 From 55b3d76671090da348d63a89417ea73dab5d315d Mon Sep 17 00:00:00 2001 From: Frederik Schwarzer Date: Fri, 23 Sep 2016 13:47:40 +0200 Subject: QQuickPositioners: fix sentence structure in apidoc Change-Id: I14eb860386dfad57ab8cf492cb782970497756b9 Reviewed-by: Robin Burchell --- src/quick/items/qquickpositioners.cpp | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) (limited to 'src/quick/items') diff --git a/src/quick/items/qquickpositioners.cpp b/src/quick/items/qquickpositioners.cpp index de2596b679..8f690c03d4 100644 --- a/src/quick/items/qquickpositioners.cpp +++ b/src/quick/items/qquickpositioners.cpp @@ -866,7 +866,7 @@ void QQuickPositionerAttached::setIsLastItem(bool isLastItem) the item that is being added. See the \l ViewTransition documentation for more details and examples on using these transitions. - \note This transition is not applied to the items that already part of the positioner + \note This transition is not applied to the items that are already part of the positioner at the time of its creation. In this case, the \l populate transition is applied instead. \sa populate, ViewTransition, {Qt Quick Examples - Positioners} @@ -1033,7 +1033,7 @@ void QQuickColumn::reportConflictingAnchors() the item that is being added. See the \l ViewTransition documentation for more details and examples on using these transitions. - \note This transition is not applied to the items that already part of the positioner + \note This transition is not applied to the items that are already part of the positioner at the time of its creation. In this case, the \l populate transition is applied instead. \sa populate, ViewTransition, {Qt Quick Examples - Positioners} @@ -1301,7 +1301,7 @@ void QQuickRow::reportConflictingAnchors() the item that is being added. See the \l ViewTransition documentation for more details and examples on using these transitions. - \note This transition is not applied to the items that already part of the positioner + \note This transition is not applied to the items that are already part of the positioner at the time of its creation. In this case, the \l populate transition is applied instead. \sa populate, ViewTransition, {Qt Quick Examples - Positioners} @@ -1876,7 +1876,7 @@ void QQuickGrid::reportConflictingAnchors() the item that is being added. See the \l ViewTransition documentation for more details and examples on using these transitions. - \note This transition is not applied to the items that already part of the positioner + \note This transition is not applied to the items that are already part of the positioner at the time of its creation. In this case, the \l populate transition is applied instead. \sa populate, ViewTransition, {Qt Quick Examples - Positioners} -- cgit v1.2.3 From 9182797dec1897cda4e2e0368a16ddbd5c18b031 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Morten=20Johan=20S=C3=B8rvig?= Date: Fri, 20 Mar 2015 13:46:43 +0100 Subject: Canvas: Implement high-DPI render mode Scale the canvas image and texture buffer by the target devicePixelRatio. Task-number: QTBUG-37095 Change-Id: Ic432b278caa5c85cf3487d3108967cf3fcd2fa48 Reviewed-by: Shawn Rutledge --- src/quick/items/context2d/qquickcontext2dtexture.cpp | 12 ++++++++++-- 1 file changed, 10 insertions(+), 2 deletions(-) (limited to 'src/quick/items') diff --git a/src/quick/items/context2d/qquickcontext2dtexture.cpp b/src/quick/items/context2d/qquickcontext2dtexture.cpp index 5ac971dc7d..78c526b299 100644 --- a/src/quick/items/context2d/qquickcontext2dtexture.cpp +++ b/src/quick/items/context2d/qquickcontext2dtexture.cpp @@ -538,6 +538,9 @@ QPaintDevice* QQuickContext2DFBOTexture::beginPainting() { QQuickContext2DTexture::beginPainting(); + const qreal devicePixelRatio = (m_item && m_item->window()) ? + m_item->window()->effectiveDevicePixelRatio() : qApp->devicePixelRatio(); + if (m_canvasWindow.size().isEmpty()) { delete m_fbo; delete m_multisampledFbo; @@ -552,7 +555,7 @@ QPaintDevice* QQuickContext2DFBOTexture::beginPainting() delete m_paint_device; m_paint_device = 0; - m_fboSize = npotAdjustedSize(m_canvasWindow.size()); + m_fboSize = npotAdjustedSize(m_canvasWindow.size() * devicePixelRatio); m_canvasWindowChanged = false; if (doMultisampling()) { @@ -590,6 +593,7 @@ QPaintDevice* QQuickContext2DFBOTexture::beginPainting() QOpenGLPaintDevice *gl_device = new QOpenGLPaintDevice(m_fbo->size()); gl_device->setPaintFlipped(true); gl_device->setSize(m_fbo->size()); + gl_device->setDevicePixelRatio(devicePixelRatio); m_paint_device = gl_device; } @@ -694,8 +698,12 @@ QPaintDevice* QQuickContext2DImageTexture::beginPainting() if (m_canvasWindow.size().isEmpty()) return 0; + const qreal devicePixelRatio = (m_item && m_item->window()) ? + m_item->window()->effectiveDevicePixelRatio() : qApp->devicePixelRatio(); + if (m_canvasWindowChanged) { - m_image = QImage(m_canvasWindow.size(), QImage::Format_ARGB32_Premultiplied); + m_image = QImage(m_canvasWindow.size() * devicePixelRatio, QImage::Format_ARGB32_Premultiplied); + m_image.setDevicePixelRatio(devicePixelRatio); m_image.fill(0x00000000); m_canvasWindowChanged = false; } -- cgit v1.2.3