Merge lp:~loic.molinari/ubuntu-ui-toolkit/ubuntu-ui-toolkit-ubuntushape-qml-code-snippets-indentation into lp:ubuntu-ui-toolkit/staging

Proposed by Loïc Molinari
Status: Merged
Approved by: Zsombor Egri
Approved revision: 1443
Merged at revision: 1443
Proposed branch: lp:~loic.molinari/ubuntu-ui-toolkit/ubuntu-ui-toolkit-ubuntushape-qml-code-snippets-indentation
Merge into: lp:ubuntu-ui-toolkit/staging
Diff against target: 152 lines (+48/-48)
2 files modified
modules/Ubuntu/Components/plugin/ucubuntushape.cpp (+32/-32)
modules/Ubuntu/Components/plugin/ucubuntushapeoverlay.cpp (+16/-16)
To merge this branch: bzr merge lp:~loic.molinari/ubuntu-ui-toolkit/ubuntu-ui-toolkit-ubuntushape-qml-code-snippets-indentation
Reviewer Review Type Date Requested Status
PS Jenkins bot continuous-integration Approve
Zsombor Egri Approve
Review via email: mp+252421@code.launchpad.net

Commit message

[UbuntuShape*] Fixed embedded QML code snippets indentation.

Description of the change

[UbuntuShape*] Fixed embedded QML code snippets indentation.

To post a comment you must log in.
Revision history for this message
Zsombor Egri (zsombi) wrote :

Thanks for the fix, docs look nice now :)

review: Approve
Revision history for this message
PS Jenkins bot (ps-jenkins) :
review: Approve (continuous-integration)

Preview Diff

[H/L] Next/Prev Comment, [J/K] Next/Prev File, [N/P] Next/Prev Hunk
=== modified file 'modules/Ubuntu/Components/plugin/ucubuntushape.cpp'
--- modules/Ubuntu/Components/plugin/ucubuntushape.cpp 2015-03-06 11:45:09 +0000
+++ modules/Ubuntu/Components/plugin/ucubuntushape.cpp 2015-03-10 11:56:07 +0000
@@ -224,21 +224,21 @@
224 Examples:224 Examples:
225225
226 \qml226 \qml
227 import Ubuntu.Components 1.2227 import Ubuntu.Components 1.2
228228
229 UbuntuShape {229 UbuntuShape {
230 backgroundColor: "green"230 backgroundColor: "green"
231 }
232 \endqml
233
234 \qml
235 import Ubuntu.Components 1.2
236
237 UbuntuShape {
238 source: Image {
239 source: "ubuntu.png"
231 }240 }
232 \endqml241 }
233
234 \qml
235 import Ubuntu.Components 1.2
236
237 UbuntuShape {
238 source: Image {
239 source: "ubuntu.png"
240 }
241 }
242 \endqml242 \endqml
243*/243*/
244UCUbuntuShape::UCUbuntuShape(QQuickItem* parent)244UCUbuntuShape::UCUbuntuShape(QQuickItem* parent)
@@ -336,26 +336,26 @@
336 It can be set either with an inlined \c Image:336 It can be set either with an inlined \c Image:
337337
338 \qml338 \qml
339 Item {339 Item {
340 UbuntuShape {340 UbuntuShape {
341 source: Image { source: "ubuntu.png" }341 source: Image { source: "ubuntu.png" }
342 }
343 }342 }
343 }
344 \endqml344 \endqml
345345
346 or with an \c Image \c id:346 or with an \c Image \c id:
347347
348 \qml348 \qml
349 Item {349 Item {
350 Image {350 Image {
351 id: img351 id: img
352 visible: false352 visible: false
353 source: "ubuntu.png"353 source: "ubuntu.png"
354 }354 }
355 UbuntuShape {355 UbuntuShape {
356 source: img356 source: img
357 }357 }
358 }358 }
359 \endqml359 \endqml
360360
361 Note that in this case, the \c Image is stored in the scene tree as any other items. So setting361 Note that in this case, the \c Image is stored in the scene tree as any other items. So setting
@@ -575,10 +575,10 @@
575 Here is a code sample showing how to apply an horizontal flip:575 Here is a code sample showing how to apply an horizontal flip:
576576
577 \qml577 \qml
578 UbuntuShape {578 UbuntuShape {
579 source: Image { source: "ubuntu.png" }579 source: Image { source: "ubuntu.png" }
580 sourceScale: Qt.vector2d(-1.0, 1.0)580 sourceScale: Qt.vector2d(-1.0, 1.0)
581 }581 }
582 \endqml582 \endqml
583583
584 \note Setting this disables support for the deprecated \l image property.584 \note Setting this disables support for the deprecated \l image property.
585585
=== modified file 'modules/Ubuntu/Components/plugin/ucubuntushapeoverlay.cpp'
--- modules/Ubuntu/Components/plugin/ucubuntushapeoverlay.cpp 2015-03-05 10:42:54 +0000
+++ modules/Ubuntu/Components/plugin/ucubuntushapeoverlay.cpp 2015-03-10 11:56:07 +0000
@@ -102,13 +102,13 @@
102 Example:102 Example:
103103
104 \qml104 \qml
105 import Ubuntu.Components 1.2105 import Ubuntu.Components 1.2
106106
107 UbuntuShapeOverlay {107 UbuntuShapeOverlay {
108 backgroundColor: "white"108 backgroundColor: "white"
109 overlayColor: "black"109 overlayColor: "black"
110 overlayGeometry: Qt.rect(0.25, 0.25, 0.5, 0.5)110 overlayGeometry: Qt.rect(0.25, 0.25, 0.5, 0.5)
111 }111 }
112 \endqml112 \endqml
113*/113*/
114UCUbuntuShapeOverlay::UCUbuntuShapeOverlay(QQuickItem* parent)114UCUbuntuShapeOverlay::UCUbuntuShapeOverlay(QQuickItem* parent)
@@ -131,22 +131,22 @@
131 at the vertical center can be done like that:131 at the vertical center can be done like that:
132132
133 \qml133 \qml
134 UbuntuShapeOverlay {134 UbuntuShapeOverlay {
135 width: 200; height: 200135 width: 200; height: 200
136 overlayColor: Qt.rgba(0.0, 0.0, 0.5, 0.5)136 overlayColor: Qt.rgba(0.0, 0.0, 0.5, 0.5)
137 overlayGeometry: Qt.rect(0.0, 0.5, 1.0, 0.5)137 overlayGeometry: Qt.rect(0.0, 0.5, 1.0, 0.5)
138 }138 }
139 \endqml139 \endqml
140140
141 Converting a position and a size in pixels to normalized item coordinates can be done with a141 Converting a position and a size in pixels to normalized item coordinates can be done with a
142 division by the size. Here is an equivalent of the previous code sample:142 division by the size. Here is an equivalent of the previous code sample:
143143
144 \qml144 \qml
145 UbuntuShapeOverlay {145 UbuntuShapeOverlay {
146 width: 200; height: 200146 width: 200; height: 200
147 overlayColor: Qt.rgba(0.0, 0.0, 0.5, 0.5)147 overlayColor: Qt.rgba(0.0, 0.0, 0.5, 0.5)
148 overlayGeometry: Qt.rect(100.0/width, 100.0/height, 200.0/width, 100.0/height)148 overlayGeometry: Qt.rect(100.0/width, 100.0/height, 200.0/width, 100.0/height)
149 }149 }
150 \endqml150 \endqml
151151
152 A geometry exceeding the item area is cropped.152 A geometry exceeding the item area is cropped.

Subscribers

People subscribed via source and target branches