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
=== modified file 'modules/Ubuntu/Components/TextField.qml'
--- modules/Ubuntu/Components/TextField.qml 2014-07-29 08:55:12 +0000
+++ modules/Ubuntu/Components/TextField.qml 2014-08-08 07:41:04 +0000
@@ -904,24 +904,23 @@
904 AbstractButton {904 AbstractButton {
905 id: clearButton905 id: clearButton
906 objectName: "clear_button"906 objectName: "clear_button"
907 property url iconSource: control.__styleInstance.iconSource
908 anchors {907 anchors {
909 top: parent.top908 top: parent.top
910 right: rightPane.left909 right: rightPane.left
911 bottom: parent.bottom910 bottom: parent.bottom
912 margins: internal.spacing911 margins: internal.spacing
913 }912 }
914 width: visible ? height : 0913 width: visible ? icon.width : 0
915 visible: control.hasClearButton &&914 visible: control.hasClearButton &&
916 (control.activeFocus && ((editor.text != "") || editor.inputMethodComposing))915 (control.activeFocus && ((editor.text != "") || editor.inputMethodComposing))
917916
918 Image {917 Icon {
918 id: icon
919 anchors.verticalCenter: parent.verticalCenter919 anchors.verticalCenter: parent.verticalCenter
920 width: units.gu(3)920 width: units.gu(2.5)
921 height: width921 height: width
922 smooth: true922 // use icon from icon-theme
923 source: control.hasClearButton ? clearButton.iconSource : ""923 name: control.hasClearButton ? "clear-search" : ""
924 onSourceChanged: print(source)
925 }924 }
926925
927 onClicked: editor.text = ""926 onClicked: editor.text = ""
928927
=== modified file 'modules/Ubuntu/Components/Themes/Ambiance/TextAreaStyle.qml'
--- modules/Ubuntu/Components/Themes/Ambiance/TextAreaStyle.qml 2014-06-16 13:10:22 +0000
+++ modules/Ubuntu/Components/Themes/Ambiance/TextAreaStyle.qml 2014-08-08 07:41:04 +0000
@@ -22,7 +22,6 @@
22Item {22Item {
23 id: visuals23 id: visuals
24 // style properties24 // style properties
25 property url iconSource: "artwork/clear.svg"
26 // FIXME: needs type checking in themes to define the proper type to be used25 // FIXME: needs type checking in themes to define the proper type to be used
27 // if color type is used, alpha value gets lost26 // if color type is used, alpha value gets lost
2827
2928
=== removed file 'modules/Ubuntu/Components/Themes/Ambiance/artwork/clear@30.svg'
--- modules/Ubuntu/Components/Themes/Ambiance/artwork/clear@30.svg 2013-06-26 23:34:49 +0000
+++ modules/Ubuntu/Components/Themes/Ambiance/artwork/clear@30.svg 1970-01-01 00:00:00 +0000
@@ -1,119 +0,0 @@
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:sodipodi="http://sodipodi.sourceforge.net/DTD/sodipodi-0.dtd"
11 xmlns:inkscape="http://www.inkscape.org/namespaces/inkscape"
12 width="90"
13 height="90"
14 id="svg3140"
15 version="1.1"
16 inkscape:version="0.48+devel r12347"
17 sodipodi:docname="clear-search.svg">
18 <defs
19 id="defs3142" />
20 <sodipodi:namedview
21 id="base"
22 pagecolor="#ffffff"
23 bordercolor="#666666"
24 borderopacity="1.0"
25 inkscape:pageopacity="0.0"
26 inkscape:pageshadow="2"
27 inkscape:zoom="5.0931704"
28 inkscape:cx="42.7926"
29 inkscape:cy="50.793477"
30 inkscape:document-units="px"
31 inkscape:current-layer="layer1"
32 showgrid="true"
33 inkscape:window-width="1920"
34 inkscape:window-height="1029"
35 inkscape:window-x="0"
36 inkscape:window-y="24"
37 inkscape:window-maximized="1"
38 fit-margin-top="0"
39 fit-margin-left="0"
40 fit-margin-right="0"
41 fit-margin-bottom="0">
42 <inkscape:grid
43 type="xygrid"
44 id="grid3178"
45 empspacing="6"
46 visible="true"
47 enabled="true"
48 snapvisiblegridlinesonly="true"
49 originx="0px"
50 originy="-1.7382813e-05px" />
51 </sodipodi:namedview>
52 <metadata
53 id="metadata3145">
54 <rdf:RDF>
55 <cc:Work
56 rdf:about="">
57 <dc:format>image/svg+xml</dc:format>
58 <dc:type
59 rdf:resource="http://purl.org/dc/dcmitype/StillImage" />
60 <dc:title></dc:title>
61 </cc:Work>
62 </rdf:RDF>
63 </metadata>
64 <g
65 inkscape:label="Layer 1"
66 inkscape:groupmode="layer"
67 id="layer1"
68 transform="translate(0,-962.36218)">
69 <rect
70 style="color:#000000;fill:none;stroke:none;stroke-width:7.5;marker:none;visibility:visible;display:inline;overflow:visible;enable-background:accumulate"
71 id="rect4198"
72 width="90"
73 height="90"
74 x="0"
75 y="962.36218" />
76 <g
77 id="g4978"
78 transform="translate(-60,548.00002)">
79 <rect
80 style="color:#000000;fill:none;stroke:none;stroke-width:6;marker:none;visibility:visible;display:inline;overflow:visible;enable-background:accumulate"
81 id="rect3032"
82 width="90"
83 height="90"
84 x="0"
85 y="1.7382814e-05"
86 transform="translate(60,414.36216)" />
87 <rect
88 style="opacity:0.05;color:#000000;fill:none;stroke:none;stroke-width:2;marker:none;visibility:visible;display:inline;overflow:visible;enable-background:accumulate"
89 id="rect3844"
90 width="90"
91 height="90.000015"
92 x="60.000004"
93 y="-504.36215"
94 transform="scale(1,-1)" />
95 <path
96 sodipodi:type="arc"
97 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"
98 id="path2995-0"
99 sodipodi:cx="35.999996"
100 sodipodi:cy="36.500011"
101 sodipodi:rx="33"
102 sodipodi:ry="33.5"
103 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"
104 transform="matrix(1.0442733,0,0,1.0308021,67.406166,421.73787)" />
105 <path
106 sodipodi:nodetypes="ccccc"
107 inkscape:connector-curvature="0"
108 id="path825"
109 d="M 116.68288,477.40901 86.953149,447.67927 93.317119,441.31531 123.04685,471.04504 Z"
110 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" />
111 <path
112 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"
113 d="m 86.953149,471.04504 29.729741,-29.72973 6.36396,6.36397 L 93.317119,477.40901 Z"
114 id="path4002"
115 inkscape:connector-curvature="0"
116 sodipodi:nodetypes="ccccc" />
117 </g>
118 </g>
119</svg>

Subscribers

People subscribed via source and target branches