aboutsummaryrefslogtreecommitdiffstats
path: root/src/imports
diff options
context:
space:
mode:
authorLiang Qi <liang.qi@qt.io>2018-06-25 10:49:57 +0200
committerLiang Qi <liang.qi@qt.io>2018-06-25 10:49:57 +0200
commit66a781692a4d21ba4c8a124cb4be84e4e2ffa742 (patch)
tree4fe9261e26281ddb5f1444563cda53c8bf39d978 /src/imports
parent7fec7105b7f6119135aafd6f9ee609128125d594 (diff)
parentd5fbbddd7794265f24d392d33c4874ac756cb9c9 (diff)
Merge remote-tracking branch 'origin/5.11' into dev
Conflicts: src/imports/controls/imagine/TextArea.qml src/imports/controls/imagine/TextField.qml tests/auto/controls/data/tst_tumbler.qml Change-Id: I25a8228a4299fb7a53db70b7223663a1637ed933
Diffstat (limited to 'src/imports')
-rw-r--r--src/imports/controls/TextArea.qml1
-rw-r--r--src/imports/controls/TextField.qml1
-rw-r--r--src/imports/controls/doc/src/qtquickcontrols2-imagine.qdoc54
-rw-r--r--src/imports/controls/doc/src/qtquickcontrols2-index.qdoc9
-rw-r--r--src/imports/controls/fusion/TextArea.qml1
-rw-r--r--src/imports/controls/fusion/TextField.qml1
-rw-r--r--src/imports/controls/imagine/TextArea.qml1
-rw-r--r--src/imports/controls/imagine/TextField.qml1
-rw-r--r--src/imports/controls/material/TextArea.qml1
-rw-r--r--src/imports/controls/material/TextField.qml2
-rw-r--r--src/imports/controls/universal/TextArea.qml1
-rw-r--r--src/imports/controls/universal/TextField.qml1
12 files changed, 73 insertions, 1 deletions
diff --git a/src/imports/controls/TextArea.qml b/src/imports/controls/TextArea.qml
index 2250cb5e..ff252bba 100644
--- a/src/imports/controls/TextArea.qml
+++ b/src/imports/controls/TextArea.qml
@@ -70,5 +70,6 @@ T.TextArea {
verticalAlignment: control.verticalAlignment
visible: !control.length && !control.preeditText && (!control.activeFocus || control.horizontalAlignment !== Qt.AlignHCenter)
elide: Text.ElideRight
+ renderType: control.renderType
}
}
diff --git a/src/imports/controls/TextField.qml b/src/imports/controls/TextField.qml
index 58de180e..aa57da81 100644
--- a/src/imports/controls/TextField.qml
+++ b/src/imports/controls/TextField.qml
@@ -70,6 +70,7 @@ T.TextField {
verticalAlignment: control.verticalAlignment
visible: !control.length && !control.preeditText && (!control.activeFocus || control.horizontalAlignment !== Qt.AlignHCenter)
elide: Text.ElideRight
+ renderType: control.renderType
}
background: Rectangle {
diff --git a/src/imports/controls/doc/src/qtquickcontrols2-imagine.qdoc b/src/imports/controls/doc/src/qtquickcontrols2-imagine.qdoc
index 9f0010c4..f24f82a9 100644
--- a/src/imports/controls/doc/src/qtquickcontrols2-imagine.qdoc
+++ b/src/imports/controls/doc/src/qtquickcontrols2-imagine.qdoc
@@ -2358,6 +2358,60 @@
\image qtquickcontrols2-imagine-9-patch-inset-boundaries.png
+ \section3 Exporting 9-Patch Images
+
+ Various vector and bitmap editors can be used to create 9-patch images
+ suitable for use with the Imagine style. The following sections briefly
+ explain the export process for each editor, and the last section explains
+ how to ensure the exported images are 9-patch-conformant.
+
+ \section4 Illustrator
+
+ See Adobe's
+ \l {https://helpx.adobe.com/in/illustrator/using/collect-assets-export-for-screens.html#panel}
+ {Asset Export panel} documentation.
+
+ \section4 Inkscape
+
+ The \l {https://github.com/mitchcurtis/inkscape-9-patch-export}
+ {Inkscape 9-Patch Export Extension} can be used to export assets with
+ Inkscape.
+
+ \section4 Photoshop
+
+ See Adobe's
+ \l {https://helpx.adobe.com/photoshop/using/generate-assets-layers.html}
+ {Generate image assets from layers} documentation.
+
+ \section4 Sketch
+
+ See Sketch's \l {https://sketchapp.com/docs/exporting/}{Exporting} documentation.
+
+ Qt Quick Controls 2 also provides a
+ \l {http://code.qt.io/cgit/qt/qtquickcontrols2.git/tree/src/imports/controls/imagine/design}
+ {plugin} for Sketch that automatically fixes the thickness of the 9-patch lines
+ after the assets are exported. To install this file, double-click on it.
+ Once Sketch has confirmed that the 9-patch export plugin has been installed,
+ the plugin will automatically process images when they are exported.
+
+ \section4 Fixing 9-Patch Lines
+
+ When exporting 9-patch images in several DPI variants (\c {@2x}, \c {@3x},
+ etc.), the 9-patch lines will typically be scaled up along with the image.
+ There are several ways to fix this, but perhaps the simplest approach is
+ to use \l {https://www.imagemagick.org/script/mogrify.php}{ImageMagick's mogrify}
+ tool. The tool has a \c -shave feature that can be used to crop the image
+ to reduce the thickness of the 9-patch lines:
+
+ \badcode
+ mogrify -shave 1x1 -path path/to/images *@2x.9.png
+ mogrify -shave 2x2 -path path/to/images *@3x.9.png
+ mogrify -shave 3x3 -path path/to/images *@4x.9.png
+ \endcode
+
+ Regular DPI images (those without the \c @Nx prefix) are not affected, so it
+ is only necessary to run the command on images intended for high DPI displays.
+
\section2 Animated Images
The \l {https://developers.google.com/speed/webp/}{WebP} and GIF animated
diff --git a/src/imports/controls/doc/src/qtquickcontrols2-index.qdoc b/src/imports/controls/doc/src/qtquickcontrols2-index.qdoc
index ba8d7527..8e3a12e7 100644
--- a/src/imports/controls/doc/src/qtquickcontrols2-index.qdoc
+++ b/src/imports/controls/doc/src/qtquickcontrols2-index.qdoc
@@ -65,6 +65,15 @@
For more details, see \l {Getting Started with Qt Quick Controls 2}.
+ \section2 Building From Source
+
+ When building from source, ensure that the \l {Qt Graphical Effects} module
+ is also built, as Qt Quick Controls 2 requires it.
+
+ The \l {Qt Image Formats} module is recommended, but not
+ required. It provides support for the \c {.webp} format used by the
+ \l {Animated Images}{Imagine style}.
+
\section1 Versions
Qt Quick Controls 2.0 was introduced in Qt 5.7. Subsequent minor Qt releases
diff --git a/src/imports/controls/fusion/TextArea.qml b/src/imports/controls/fusion/TextArea.qml
index 04b25cb3..d2469d28 100644
--- a/src/imports/controls/fusion/TextArea.qml
+++ b/src/imports/controls/fusion/TextArea.qml
@@ -72,5 +72,6 @@ T.TextArea {
verticalAlignment: control.verticalAlignment
visible: !control.length && !control.preeditText && (!control.activeFocus || control.horizontalAlignment !== Qt.AlignHCenter)
elide: Text.ElideRight
+ renderType: control.renderType
}
}
diff --git a/src/imports/controls/fusion/TextField.qml b/src/imports/controls/fusion/TextField.qml
index 12331dd6..6f5f49b3 100644
--- a/src/imports/controls/fusion/TextField.qml
+++ b/src/imports/controls/fusion/TextField.qml
@@ -71,6 +71,7 @@ T.TextField {
verticalAlignment: control.verticalAlignment
visible: !control.length && !control.preeditText && (!control.activeFocus || control.horizontalAlignment !== Qt.AlignHCenter)
elide: Text.ElideRight
+ renderType: control.renderType
}
background: Rectangle {
diff --git a/src/imports/controls/imagine/TextArea.qml b/src/imports/controls/imagine/TextArea.qml
index c50b2f18..94fe237c 100644
--- a/src/imports/controls/imagine/TextArea.qml
+++ b/src/imports/controls/imagine/TextArea.qml
@@ -80,6 +80,7 @@ T.TextArea {
verticalAlignment: control.verticalAlignment
visible: !control.length && !control.preeditText && (!control.activeFocus || control.horizontalAlignment !== Qt.AlignHCenter)
elide: Text.ElideRight
+ renderType: control.renderType
}
background: NinePatchImage {
diff --git a/src/imports/controls/imagine/TextField.qml b/src/imports/controls/imagine/TextField.qml
index 94298fbc..2943396e 100644
--- a/src/imports/controls/imagine/TextField.qml
+++ b/src/imports/controls/imagine/TextField.qml
@@ -79,6 +79,7 @@ T.TextField {
verticalAlignment: control.verticalAlignment
visible: !control.length && !control.preeditText && (!control.activeFocus || control.horizontalAlignment !== Qt.AlignHCenter)
elide: Text.ElideRight
+ renderType: control.renderType
}
background: NinePatchImage {
diff --git a/src/imports/controls/material/TextArea.qml b/src/imports/controls/material/TextArea.qml
index 7fbc5cbc..ce49af53 100644
--- a/src/imports/controls/material/TextArea.qml
+++ b/src/imports/controls/material/TextArea.qml
@@ -71,6 +71,7 @@ T.TextArea {
color: control.placeholderTextColor
verticalAlignment: control.verticalAlignment
elide: Text.ElideRight
+ renderType: control.renderType
visible: !control.length && !control.preeditText && (!control.activeFocus || control.horizontalAlignment !== Qt.AlignHCenter)
}
diff --git a/src/imports/controls/material/TextField.qml b/src/imports/controls/material/TextField.qml
index 40189d74..7aa612eb 100644
--- a/src/imports/controls/material/TextField.qml
+++ b/src/imports/controls/material/TextField.qml
@@ -72,8 +72,8 @@ T.TextField {
color: control.placeholderTextColor
verticalAlignment: control.verticalAlignment
elide: Text.ElideRight
+ renderType: control.renderType
visible: !control.length && !control.preeditText && (!control.activeFocus || control.horizontalAlignment !== Qt.AlignHCenter)
-
}
background: Rectangle {
diff --git a/src/imports/controls/universal/TextArea.qml b/src/imports/controls/universal/TextArea.qml
index 83602426..2d5934df 100644
--- a/src/imports/controls/universal/TextArea.qml
+++ b/src/imports/controls/universal/TextArea.qml
@@ -78,6 +78,7 @@ T.TextArea {
visible: !control.length && !control.preeditText && (!control.activeFocus || control.horizontalAlignment !== Qt.AlignHCenter)
verticalAlignment: control.verticalAlignment
elide: Text.ElideRight
+ renderType: control.renderType
}
background: Rectangle {
diff --git a/src/imports/controls/universal/TextField.qml b/src/imports/controls/universal/TextField.qml
index 1a181c00..04e40fa5 100644
--- a/src/imports/controls/universal/TextField.qml
+++ b/src/imports/controls/universal/TextField.qml
@@ -78,6 +78,7 @@ T.TextField {
visible: !control.length && !control.preeditText && (!control.activeFocus || control.horizontalAlignment !== Qt.AlignHCenter)
verticalAlignment: control.verticalAlignment
elide: Text.ElideRight
+ renderType: control.renderType
}
background: Rectangle {