Merge lp:~zsombi/ubuntu-ui-toolkit/textfield-clearbutton into lp:ubuntu-ui-toolkit/staging

Proposed by Zsombor Egri
Status: Merged
Approved by: Zsombor Egri
Approved revision: 1168
Merged at revision: 1184
Proposed branch: lp:~zsombi/ubuntu-ui-toolkit/textfield-clearbutton
Merge into: lp:ubuntu-ui-toolkit/staging
Diff against target: 170 lines (+6/-127)
3 files modified
modules/Ubuntu/Components/TextField.qml (+6/-7)
modules/Ubuntu/Components/Themes/Ambiance/TextAreaStyle.qml (+0/-1)
modules/Ubuntu/Components/Themes/Ambiance/artwork/clear@30.svg (+0/-119)
To merge this branch: bzr merge lp:~zsombi/ubuntu-ui-toolkit/textfield-clearbutton
Reviewer Review Type Date Requested Status
PS Jenkins bot continuous-integration Approve
Cris Dywan Approve
Review via email: mp+230055@code.launchpad.net

Commit message

TextField clear button size changed to 2.5 GU, artwork mosified to use "clear-search" from icon-theme.

To post a comment you must log in.
Revision history for this message
Cris Dywan (kalikiana) wrote :

30 + // use icon from icon-theme
31 + name: control.hasClearButton ? "clear-search" : ""

That's redundant, AbstractButton.visible already depends on that.

review: Needs Fixing
Revision history for this message
Zsombor Egri (zsombi) wrote :

> 30 + // use icon from icon-theme
> 31 + name: control.hasClearButton ? "clear-search" : ""
>
> That's redundant, AbstractButton.visible already depends on that.

The line is for pure memory saving, i.e. if the button is not needed, there should not be any icon loaded. visible: false does not discard the image itself.

Revision history for this message
Cris Dywan (kalikiana) :
review: Approve
Revision history for this message
PS Jenkins bot (ps-jenkins) wrote :
review: Needs Fixing (continuous-integration)
Revision history for this message
PS Jenkins bot (ps-jenkins) wrote :
review: Needs Fixing (continuous-integration)
Revision history for this message
PS Jenkins bot (ps-jenkins) wrote :
review: Needs Fixing (continuous-integration)
Revision history for this message
PS Jenkins bot (ps-jenkins) :
review: Approve (continuous-integration)
Revision history for this message
PS Jenkins bot (ps-jenkins) wrote :

PASSED: Continuous integration, rev:1168
http://jenkins.qa.ubuntu.com/job/ubuntu-sdk-team-ubuntu-ui-toolkit-staging-ci/788/
Executed test runs:
    SUCCESS: http://jenkins.qa.ubuntu.com/job/generic-deb-autopilot-utopic-touch/3386
    SUCCESS: http://jenkins.qa.ubuntu.com/job/generic-mediumtests-utopic/2656
    SUCCESS: http://jenkins.qa.ubuntu.com/job/ubuntu-sdk-team-ubuntu-ui-toolkit-staging-utopic-amd64-ci/620
    SUCCESS: http://jenkins.qa.ubuntu.com/job/ubuntu-sdk-team-ubuntu-ui-toolkit-staging-utopic-armhf-ci/620
        deb: http://jenkins.qa.ubuntu.com/job/ubuntu-sdk-team-ubuntu-ui-toolkit-staging-utopic-armhf-ci/620/artifact/work/output/*zip*/output.zip
    SUCCESS: http://jenkins.qa.ubuntu.com/job/ubuntu-sdk-team-ubuntu-ui-toolkit-staging-utopic-i386-ci/620
    SUCCESS: http://jenkins.qa.ubuntu.com/job/generic-deb-autopilot-runner-mako/3312
    SUCCESS: http://jenkins.qa.ubuntu.com/job/generic-mediumtests-builder-utopic-armhf/4633
        deb: http://jenkins.qa.ubuntu.com/job/generic-mediumtests-builder-utopic-armhf/4633/artifact/work/output/*zip*/output.zip
    SUCCESS: http://s-jenkins.ubuntu-ci:8080/job/touch-flash-device/11312
    SUCCESS: http://jenkins.qa.ubuntu.com/job/autopilot-testrunner-otto-utopic/2147
    SUCCESS: http://jenkins.qa.ubuntu.com/job/generic-mediumtests-builder-utopic-amd64/2933
        deb: http://jenkins.qa.ubuntu.com/job/generic-mediumtests-builder-utopic-amd64/2933/artifact/work/output/*zip*/output.zip

Click here to trigger a rebuild:
http://s-jenkins.ubuntu-ci:8080/job/ubuntu-sdk-team-ubuntu-ui-toolkit-staging-ci/788/rebuild

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

PASSED: Continuous integration, rev:1168
http://jenkins.qa.ubuntu.com/job/ubuntu-sdk-team-ubuntu-ui-toolkit-staging-ci/793/
Executed test runs:
    SUCCESS: http://jenkins.qa.ubuntu.com/job/generic-deb-autopilot-utopic-touch/3404
    SUCCESS: http://jenkins.qa.ubuntu.com/job/generic-mediumtests-utopic/2673
    SUCCESS: http://jenkins.qa.ubuntu.com/job/ubuntu-sdk-team-ubuntu-ui-toolkit-staging-utopic-amd64-ci/625
    SUCCESS: http://jenkins.qa.ubuntu.com/job/ubuntu-sdk-team-ubuntu-ui-toolkit-staging-utopic-armhf-ci/625
        deb: http://jenkins.qa.ubuntu.com/job/ubuntu-sdk-team-ubuntu-ui-toolkit-staging-utopic-armhf-ci/625/artifact/work/output/*zip*/output.zip
    SUCCESS: http://jenkins.qa.ubuntu.com/job/ubuntu-sdk-team-ubuntu-ui-toolkit-staging-utopic-i386-ci/625
    SUCCESS: http://jenkins.qa.ubuntu.com/job/generic-deb-autopilot-runner-mako/3326
    SUCCESS: http://jenkins.qa.ubuntu.com/job/generic-mediumtests-builder-utopic-armhf/4651
        deb: http://jenkins.qa.ubuntu.com/job/generic-mediumtests-builder-utopic-armhf/4651/artifact/work/output/*zip*/output.zip
    SUCCESS: http://s-jenkins.ubuntu-ci:8080/job/touch-flash-device/11330
    SUCCESS: http://jenkins.qa.ubuntu.com/job/autopilot-testrunner-otto-utopic/2161
    SUCCESS: http://jenkins.qa.ubuntu.com/job/generic-mediumtests-builder-utopic-amd64/2950
        deb: http://jenkins.qa.ubuntu.com/job/generic-mediumtests-builder-utopic-amd64/2950/artifact/work/output/*zip*/output.zip

Click here to trigger a rebuild:
http://s-jenkins.ubuntu-ci:8080/job/ubuntu-sdk-team-ubuntu-ui-toolkit-staging-ci/793/rebuild

review: Approve (continuous-integration)

Preview Diff

[H/L] Next/Prev Comment, [J/K] Next/Prev File, [N/P] Next/Prev Hunk
1=== modified file 'modules/Ubuntu/Components/TextField.qml'
2--- modules/Ubuntu/Components/TextField.qml 2014-07-29 08:55:12 +0000
3+++ modules/Ubuntu/Components/TextField.qml 2014-08-08 07:41:04 +0000
4@@ -904,24 +904,23 @@
5 AbstractButton {
6 id: clearButton
7 objectName: "clear_button"
8- property url iconSource: control.__styleInstance.iconSource
9 anchors {
10 top: parent.top
11 right: rightPane.left
12 bottom: parent.bottom
13 margins: internal.spacing
14 }
15- width: visible ? height : 0
16+ width: visible ? icon.width : 0
17 visible: control.hasClearButton &&
18 (control.activeFocus && ((editor.text != "") || editor.inputMethodComposing))
19
20- Image {
21+ Icon {
22+ id: icon
23 anchors.verticalCenter: parent.verticalCenter
24- width: units.gu(3)
25+ width: units.gu(2.5)
26 height: width
27- smooth: true
28- source: control.hasClearButton ? clearButton.iconSource : ""
29- onSourceChanged: print(source)
30+ // use icon from icon-theme
31+ name: control.hasClearButton ? "clear-search" : ""
32 }
33
34 onClicked: editor.text = ""
35
36=== modified file 'modules/Ubuntu/Components/Themes/Ambiance/TextAreaStyle.qml'
37--- modules/Ubuntu/Components/Themes/Ambiance/TextAreaStyle.qml 2014-06-16 13:10:22 +0000
38+++ modules/Ubuntu/Components/Themes/Ambiance/TextAreaStyle.qml 2014-08-08 07:41:04 +0000
39@@ -22,7 +22,6 @@
40 Item {
41 id: visuals
42 // style properties
43- property url iconSource: "artwork/clear.svg"
44 // FIXME: needs type checking in themes to define the proper type to be used
45 // if color type is used, alpha value gets lost
46
47
48=== removed file 'modules/Ubuntu/Components/Themes/Ambiance/artwork/clear@30.svg'
49--- modules/Ubuntu/Components/Themes/Ambiance/artwork/clear@30.svg 2013-06-26 23:34:49 +0000
50+++ modules/Ubuntu/Components/Themes/Ambiance/artwork/clear@30.svg 1970-01-01 00:00:00 +0000
51@@ -1,119 +0,0 @@
52-<?xml version="1.0" encoding="UTF-8" standalone="no"?>
53-<!-- Created with Inkscape (http://www.inkscape.org/) -->
54-
55-<svg
56- xmlns:dc="http://purl.org/dc/elements/1.1/"
57- xmlns:cc="http://creativecommons.org/ns#"
58- xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#"
59- xmlns:svg="http://www.w3.org/2000/svg"
60- xmlns="http://www.w3.org/2000/svg"
61- xmlns:sodipodi="http://sodipodi.sourceforge.net/DTD/sodipodi-0.dtd"
62- xmlns:inkscape="http://www.inkscape.org/namespaces/inkscape"
63- width="90"
64- height="90"
65- id="svg3140"
66- version="1.1"
67- inkscape:version="0.48+devel r12347"
68- sodipodi:docname="clear-search.svg">
69- <defs
70- id="defs3142" />
71- <sodipodi:namedview
72- id="base"
73- pagecolor="#ffffff"
74- bordercolor="#666666"
75- borderopacity="1.0"
76- inkscape:pageopacity="0.0"
77- inkscape:pageshadow="2"
78- inkscape:zoom="5.0931704"
79- inkscape:cx="42.7926"
80- inkscape:cy="50.793477"
81- inkscape:document-units="px"
82- inkscape:current-layer="layer1"
83- showgrid="true"
84- inkscape:window-width="1920"
85- inkscape:window-height="1029"
86- inkscape:window-x="0"
87- inkscape:window-y="24"
88- inkscape:window-maximized="1"
89- fit-margin-top="0"
90- fit-margin-left="0"
91- fit-margin-right="0"
92- fit-margin-bottom="0">
93- <inkscape:grid
94- type="xygrid"
95- id="grid3178"
96- empspacing="6"
97- visible="true"
98- enabled="true"
99- snapvisiblegridlinesonly="true"
100- originx="0px"
101- originy="-1.7382813e-05px" />
102- </sodipodi:namedview>
103- <metadata
104- id="metadata3145">
105- <rdf:RDF>
106- <cc:Work
107- rdf:about="">
108- <dc:format>image/svg+xml</dc:format>
109- <dc:type
110- rdf:resource="http://purl.org/dc/dcmitype/StillImage" />
111- <dc:title></dc:title>
112- </cc:Work>
113- </rdf:RDF>
114- </metadata>
115- <g
116- inkscape:label="Layer 1"
117- inkscape:groupmode="layer"
118- id="layer1"
119- transform="translate(0,-962.36218)">
120- <rect
121- style="color:#000000;fill:none;stroke:none;stroke-width:7.5;marker:none;visibility:visible;display:inline;overflow:visible;enable-background:accumulate"
122- id="rect4198"
123- width="90"
124- height="90"
125- x="0"
126- y="962.36218" />
127- <g
128- id="g4978"
129- transform="translate(-60,548.00002)">
130- <rect
131- style="color:#000000;fill:none;stroke:none;stroke-width:6;marker:none;visibility:visible;display:inline;overflow:visible;enable-background:accumulate"
132- id="rect3032"
133- width="90"
134- height="90"
135- x="0"
136- y="1.7382814e-05"
137- transform="translate(60,414.36216)" />
138- <rect
139- style="opacity:0.05;color:#000000;fill:none;stroke:none;stroke-width:2;marker:none;visibility:visible;display:inline;overflow:visible;enable-background:accumulate"
140- id="rect3844"
141- width="90"
142- height="90.000015"
143- x="60.000004"
144- y="-504.36215"
145- transform="scale(1,-1)" />
146- <path
147- sodipodi:type="arc"
148- style="color:#000000;fill:none;stroke:#808080;stroke-width:8.67455864;stroke-miterlimit:4;stroke-dasharray:none;marker:none;visibility:visible;display:inline;overflow:visible;enable-background:accumulate"
149- id="path2995-0"
150- sodipodi:cx="35.999996"
151- sodipodi:cy="36.500011"
152- sodipodi:rx="33"
153- sodipodi:ry="33.5"
154- d="m 68.999996,36.500011 c 0,18.50154 -14.774603,33.5 -33,33.5 -18.225397,0 -32.9999998,-14.99846 -32.9999998,-33.5 0,-18.501539 14.7746028,-33.4999996 32.9999998,-33.4999996 C 54.225393,3.0000114 68.999996,17.998472 68.999996,36.500011 Z"
155- transform="matrix(1.0442733,0,0,1.0308021,67.406166,421.73787)" />
156- <path
157- sodipodi:nodetypes="ccccc"
158- inkscape:connector-curvature="0"
159- id="path825"
160- d="M 116.68288,477.40901 86.953149,447.67927 93.317119,441.31531 123.04685,471.04504 Z"
161- style="color:#000000;fill:#808080;fill-opacity:1;fill-rule:nonzero;stroke:none;stroke-width:2;marker:none;visibility:visible;display:inline;overflow:visible;enable-background:accumulate" />
162- <path
163- style="color:#000000;fill:#808080;fill-opacity:1;fill-rule:nonzero;stroke:none;stroke-width:2;marker:none;visibility:visible;display:inline;overflow:visible;enable-background:accumulate"
164- d="m 86.953149,471.04504 29.729741,-29.72973 6.36396,6.36397 L 93.317119,477.40901 Z"
165- id="path4002"
166- inkscape:connector-curvature="0"
167- sodipodi:nodetypes="ccccc" />
168- </g>
169- </g>
170-</svg>

Subscribers

People subscribed via source and target branches