Merge lp:~arashbm/cliffhanger/searchbox into lp:~flashback-dev/cliffhanger/trunk

Proposed by Arash Badie Modiri
Status: Merged
Merged at revision: 7
Proposed branch: lp:~arashbm/cliffhanger/searchbox
Merge into: lp:~flashback-dev/cliffhanger/trunk
Diff against target: 222 lines (+174/-15)
3 files modified
components/SearchBox.qml (+20/-14)
components/SearchPage.qml (+1/-1)
graphics/search_icon@8.svg (+153/-0)
To merge this branch: bzr merge lp:~arashbm/cliffhanger/searchbox
Reviewer Review Type Date Requested Status
Nekhelesh Ramananthan Approve
Review via email: mp+195211@code.launchpad.net

Description of the change

Removing search button from SearchBox component. Works with a timer like ubuntu-clock-app's SearchBox component.

To post a comment you must log in.
Revision history for this message
Nekhelesh Ramananthan (nik90) wrote :

Thanks for your contribution. This is a nice improvement. There are just some small things that need fixing.

1. The image search_icon.svg is not present in your branch. Hence when I run it, it complains that image is missing.

2. Can you replace the line 34 + width: parent.width with anchors { right: parent.right } since we are already using achors for the left and top position.

review: Needs Fixing
Revision history for this message
Arash Badie Modiri (arashbm) wrote :

> 1. The image search_icon.svg is not present in your branch. Hence when I run
> it, it complains that image is missing.
Ouch! forgot to `bzr add` the file!

lp:~arashbm/cliffhanger/searchbox updated
8. By Arash Badie Modiri

adding missing search icon

9. By Arash Badie Modiri

cleaning up SearchBox styling

Revision history for this message
Nekhelesh Ramananthan (nik90) wrote :

lgtm!

review: Approve

Preview Diff

[H/L] Next/Prev Comment, [J/K] Next/Prev File, [N/P] Next/Prev Hunk
=== modified file 'components/SearchBox.qml'
--- components/SearchBox.qml 2013-11-12 17:43:07 +0000
+++ components/SearchBox.qml 2013-11-14 16:12:32 +0000
@@ -6,27 +6,33 @@
66
7 property alias defaultText: searchField.placeholderText7 property alias defaultText: searchField.placeholderText
8 property alias search_term: searchField.text8 property alias search_term: searchField.text
9 signal searchClicked()9 signal searchTriggered()
10
11 Component.onCompleted: search_timer.triggered.connect(searchTriggered)
1012
11 TextField {13 TextField {
12 id: searchField14 id: searchField
13 anchors {15 anchors {
14 left: parent.left16 left: parent.left
17 right: parent.right
15 top: parent.top18 top: parent.top
16 }19 }
17 width: 2 * parent.width / 320
21 primaryItem: Image {
22 height: parent.height/1.5;
23 fillMode: Image.PreserveAspectFit
24 source: Qt.resolvedUrl("../graphics/search_icon.svg")
25 }
26
27 Timer {
28 id: search_timer
29 interval: 1100
30 repeat: false
31 }
32
33 placeholderText: i18n.tr("Search")
18 hasClearButton: true34 hasClearButton: true
19 }35 onTextChanged: search_timer.restart()
20
21 Button{
22 anchors {
23 left: searchField.right
24 top: parent.top
25 right: parent.right
26 leftMargin: units.gu(1)
27 }
28 text: "Search"
29 height: searchField.height
30 onClicked: searchBox.searchClicked()
31 }36 }
32}37}
38
3339
=== modified file 'components/SearchPage.qml'
--- components/SearchPage.qml 2013-11-12 20:09:36 +0000
+++ components/SearchPage.qml 2013-11-14 16:12:32 +0000
@@ -20,7 +20,7 @@
20 right: parent.right20 right: parent.right
21 margins: units.gu(2)21 margins: units.gu(2)
22 }22 }
23 onSearchClicked: {23 onSearchTriggered: {
24 _search_results.clear()24 _search_results.clear()
25 _searchWorker.sendMessage({"model": _search_results, "url": search_url + "&query=" + encodeURIComponent(_searchBox.search_term), "type": type})25 _searchWorker.sendMessage({"model": _search_results, "url": search_url + "&query=" + encodeURIComponent(_searchBox.search_term), "type": type})
26 }26 }
2727
=== added file 'graphics/search_icon@8.svg'
--- graphics/search_icon@8.svg 1970-01-01 00:00:00 +0000
+++ graphics/search_icon@8.svg 2013-11-14 16:12:32 +0000
@@ -0,0 +1,153 @@
1<?xml version="1.0" encoding="UTF-8" standalone="no"?>
2<!-- Created with Inkscape (http://www.inkscape.org/) -->
3
4<svg
5 xmlns:dc="http://purl.org/dc/elements/1.1/"
6 xmlns:cc="http://creativecommons.org/ns#"
7 xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#"
8 xmlns:svg="http://www.w3.org/2000/svg"
9 xmlns="http://www.w3.org/2000/svg"
10 xmlns:xlink="http://www.w3.org/1999/xlink"
11 xmlns:sodipodi="http://sodipodi.sourceforge.net/DTD/sodipodi-0.dtd"
12 xmlns:inkscape="http://www.inkscape.org/namespaces/inkscape"
13 width="32"
14 height="32"
15 id="svg3133"
16 version="1.1"
17 inkscape:version="0.48.4 r9939"
18 sodipodi:docname="search.svg">
19 <defs
20 id="defs3135">
21 <linearGradient
22 inkscape:collect="always"
23 id="linearGradient3803">
24 <stop
25 style="stop-color:#e7e5e5;stop-opacity:1;"
26 offset="0"
27 id="stop3805" />
28 <stop
29 style="stop-color:#e2dfdf;stop-opacity:1"
30 offset="1"
31 id="stop3807" />
32 </linearGradient>
33 <linearGradient
34 inkscape:collect="always"
35 xlink:href="#linearGradient3803"
36 id="linearGradient3809"
37 x1="53.012165"
38 y1="-102.79017"
39 x2="53.012165"
40 y2="-66.661224"
41 gradientUnits="userSpaceOnUse" />
42 <linearGradient
43 inkscape:collect="always"
44 xlink:href="#linearGradient3803"
45 id="linearGradient3813"
46 gradientUnits="userSpaceOnUse"
47 x1="53.012165"
48 y1="-102.79017"
49 x2="53.012165"
50 y2="-66.661224"
51 gradientTransform="translate(-625,0)" />
52 </defs>
53 <sodipodi:namedview
54 id="base"
55 pagecolor="#ffffff"
56 bordercolor="#666666"
57 borderopacity="1.0"
58 inkscape:pageopacity="0.0"
59 inkscape:pageshadow="2"
60 inkscape:zoom="11.313708"
61 inkscape:cx="27.957393"
62 inkscape:cy="7.2819708"
63 inkscape:document-units="px"
64 inkscape:current-layer="g3842"
65 showgrid="true"
66 inkscape:window-width="1855"
67 inkscape:window-height="1056"
68 inkscape:window-x="65"
69 inkscape:window-y="24"
70 inkscape:window-maximized="1"
71 inkscape:snap-grids="true"
72 inkscape:snap-global="true"
73 fit-margin-top="0"
74 fit-margin-left="0"
75 fit-margin-right="0"
76 fit-margin-bottom="0"
77 inkscape:snap-bbox="true"
78 inkscape:bbox-paths="true"
79 inkscape:bbox-nodes="true"
80 inkscape:snap-bbox-edge-midpoints="true"
81 inkscape:snap-bbox-midpoints="true"
82 inkscape:object-paths="true"
83 inkscape:snap-intersection-paths="true"
84 inkscape:snap-midpoints="true"
85 inkscape:snap-smooth-nodes="true"
86 inkscape:object-nodes="true"
87 inkscape:snap-object-midpoints="true"
88 inkscape:snap-center="true">
89 <inkscape:grid
90 type="xygrid"
91 id="grid3016"
92 empspacing="6"
93 visible="true"
94 enabled="true"
95 snapvisiblegridlinesonly="true"
96 originx="-2.98e-06px"
97 originy="2.6171874e-06px" />
98 </sodipodi:namedview>
99 <metadata
100 id="metadata3138">
101 <rdf:RDF>
102 <cc:Work
103 rdf:about="">
104 <dc:format>image/svg+xml</dc:format>
105 <dc:type
106 rdf:resource="http://purl.org/dc/dcmitype/StillImage" />
107 <dc:title></dc:title>
108 </cc:Work>
109 </rdf:RDF>
110 </metadata>
111 <g
112 inkscape:label="Layer 1"
113 inkscape:groupmode="layer"
114 id="layer1"
115 transform="translate(-2.98e-6,-1020.3622)"
116 style="display:inline">
117 <g
118 transform="matrix(0.99934414,0,0,1,-106.92982,549.00002)"
119 id="g3842"
120 style="display:inline">
121 <rect
122 style="opacity:0.05;color:#000000;fill:none;stroke:none;stroke-width:2;marker:none;visibility:visible;display:inline;overflow:visible;enable-background:accumulate"
123 id="rect3844"
124 width="32.021008"
125 height="32.000011"
126 x="107"
127 y="-503.36218"
128 transform="scale(1,-1)" />
129 <path
130 sodipodi:type="arc"
131 style="color:#000000;fill:none;stroke:#808080;stroke-width:10.49972248;stroke-miterlimit:4;stroke-dasharray:none;marker:none;visibility:visible;display:inline;overflow:visible;enable-background:accumulate"
132 id="path2995"
133 sodipodi:cx="35.999996"
134 sodipodi:cy="36.500011"
135 sodipodi:rx="33"
136 sodipodi:ry="33.5"
137 d="m 68.999996,36.500011 a 33,33.5 0 1 1 -65.9999998,0 33,33.5 0 1 1 65.9999998,0 z"
138 transform="matrix(0.30695569,0,0,0.30279797,111.9601,476.31005)" />
139 <path
140 style="font-size:xx-small;font-style:normal;font-variant:normal;font-weight:normal;font-stretch:normal;text-indent:0;text-align:start;text-decoration:none;line-height:normal;letter-spacing:normal;word-spacing:normal;text-transform:none;direction:ltr;block-progression:tb;writing-mode:lr-tb;text-anchor:start;baseline-shift:baseline;color:#000000;fill:#808080;fill-opacity:1;stroke:none;stroke-width:6;marker:none;visibility:visible;display:inline;overflow:visible;enable-background:accumulate;font-family:Sans;-inkscape-font-specification:Sans"
141 d="m 131.23812,494.07329 -1.51211,1.51111 4.26947,4.26666 1.5121,-1.5111 z"
142 id="path3765"
143 inkscape:connector-curvature="0"
144 sodipodi:nodetypes="ccccc" />
145 <path
146 style="font-size:xx-small;font-style:normal;font-variant:normal;font-weight:normal;font-stretch:normal;text-indent:0;text-align:start;text-decoration:none;line-height:normal;letter-spacing:normal;word-spacing:normal;text-transform:none;direction:ltr;block-progression:tb;writing-mode:lr-tb;text-anchor:start;baseline-shift:baseline;color:#000000;fill:#808080;fill-opacity:1;stroke:none;stroke-width:11.80387211;marker:none;visibility:visible;display:inline;overflow:visible;enable-background:accumulate;font-family:Sans;-inkscape-font-specification:Sans"
147 d="m 133.30117,495.55563 c -0.82645,0.004 -1.62501,0.54578 -1.9348,1.31198 -0.30979,0.7662 -0.11199,1.71055 0.47924,2.28802 l 3.12758,3.12885 c 1.43195,1.51965 1.74071,1.31459 3.0114,0.0447 1.27069,-1.26986 1.47821,-1.48946 -0.0447,-3.01141 l -3.12758,-3.12885 c -0.39175,-0.40166 -0.95004,-0.63566 -1.51111,-0.63333 z"
148 id="path3767"
149 inkscape:connector-curvature="0"
150 sodipodi:nodetypes="cscczccc" />
151 </g>
152 </g>
153</svg>

Subscribers

People subscribed via source and target branches