Merge lp:~zsombi/ubuntu-ui-toolkit/textfield-clearbutton into lp:ubuntu-ui-toolkit/staging
- textfield-clearbutton
- Merge into staging
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 | ||||
Related bugs: |
|
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.
Description of the change
Zsombor Egri (zsombi) wrote : | # |
> 30 + // use icon from icon-theme
> 31 + name: control.
>
> That's redundant, AbstractButton.
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.
Cris Dywan (kalikiana) : | # |
PS Jenkins bot (ps-jenkins) wrote : | # |
FAILED: Continuous integration, rev:1168
http://
Executed test runs:
FAILURE: http://
FAILURE: http://
FAILURE: http://
FAILURE: http://
FAILURE: http://
FAILURE: http://
FAILURE: http://
Click here to trigger a rebuild:
http://
PS Jenkins bot (ps-jenkins) wrote : | # |
FAILED: Autolanding.
More details in the following jenkins job:
http://
Executed test runs:
FAILURE: http://
FAILURE: http://
FAILURE: http://
FAILURE: http://
FAILURE: http://
FAILURE: http://
FAILURE: http://
PS Jenkins bot (ps-jenkins) wrote : | # |
FAILED: Autolanding.
More details in the following jenkins job:
http://
Executed test runs:
FAILURE: http://
FAILURE: http://
FAILURE: http://
FAILURE: http://
FAILURE: http://
FAILURE: http://
FAILURE: http://
PS Jenkins bot (ps-jenkins) : | # |
PS Jenkins bot (ps-jenkins) wrote : | # |
PASSED: Continuous integration, rev:1168
http://
Executed test runs:
SUCCESS: http://
SUCCESS: http://
SUCCESS: http://
SUCCESS: http://
deb: http://
SUCCESS: http://
SUCCESS: http://
SUCCESS: http://
deb: http://
SUCCESS: http://
SUCCESS: http://
SUCCESS: http://
deb: http://
Click here to trigger a rebuild:
http://
PS Jenkins bot (ps-jenkins) wrote : | # |
PASSED: Continuous integration, rev:1168
http://
Executed test runs:
SUCCESS: http://
SUCCESS: http://
SUCCESS: http://
SUCCESS: http://
deb: http://
SUCCESS: http://
SUCCESS: http://
SUCCESS: http://
deb: http://
SUCCESS: http://
SUCCESS: http://
SUCCESS: http://
deb: http://
Click here to trigger a rebuild:
http://
Preview Diff
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 | 904 | AbstractButton { | 904 | AbstractButton { |
6 | 905 | id: clearButton | 905 | id: clearButton |
7 | 906 | objectName: "clear_button" | 906 | objectName: "clear_button" |
8 | 907 | property url iconSource: control.__styleInstance.iconSource | ||
9 | 908 | anchors { | 907 | anchors { |
10 | 909 | top: parent.top | 908 | top: parent.top |
11 | 910 | right: rightPane.left | 909 | right: rightPane.left |
12 | 911 | bottom: parent.bottom | 910 | bottom: parent.bottom |
13 | 912 | margins: internal.spacing | 911 | margins: internal.spacing |
14 | 913 | } | 912 | } |
16 | 914 | width: visible ? height : 0 | 913 | width: visible ? icon.width : 0 |
17 | 915 | visible: control.hasClearButton && | 914 | visible: control.hasClearButton && |
18 | 916 | (control.activeFocus && ((editor.text != "") || editor.inputMethodComposing)) | 915 | (control.activeFocus && ((editor.text != "") || editor.inputMethodComposing)) |
19 | 917 | 916 | ||
21 | 918 | Image { | 917 | Icon { |
22 | 918 | id: icon | ||
23 | 919 | anchors.verticalCenter: parent.verticalCenter | 919 | anchors.verticalCenter: parent.verticalCenter |
25 | 920 | width: units.gu(3) | 920 | width: units.gu(2.5) |
26 | 921 | height: width | 921 | height: width |
30 | 922 | smooth: true | 922 | // use icon from icon-theme |
31 | 923 | source: control.hasClearButton ? clearButton.iconSource : "" | 923 | name: control.hasClearButton ? "clear-search" : "" |
29 | 924 | onSourceChanged: print(source) | ||
32 | 925 | } | 924 | } |
33 | 926 | 925 | ||
34 | 927 | onClicked: editor.text = "" | 926 | onClicked: editor.text = "" |
35 | 928 | 927 | ||
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 | 22 | Item { | 22 | Item { |
41 | 23 | id: visuals | 23 | id: visuals |
42 | 24 | // style properties | 24 | // style properties |
43 | 25 | property url iconSource: "artwork/clear.svg" | ||
44 | 26 | // FIXME: needs type checking in themes to define the proper type to be used | 25 | // FIXME: needs type checking in themes to define the proper type to be used |
45 | 27 | // if color type is used, alpha value gets lost | 26 | // if color type is used, alpha value gets lost |
46 | 28 | 27 | ||
47 | 29 | 28 | ||
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 | 1 | <?xml version="1.0" encoding="UTF-8" standalone="no"?> | ||
53 | 2 | <!-- Created with Inkscape (http://www.inkscape.org/) --> | ||
54 | 3 | |||
55 | 4 | <svg | ||
56 | 5 | xmlns:dc="http://purl.org/dc/elements/1.1/" | ||
57 | 6 | xmlns:cc="http://creativecommons.org/ns#" | ||
58 | 7 | xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#" | ||
59 | 8 | xmlns:svg="http://www.w3.org/2000/svg" | ||
60 | 9 | xmlns="http://www.w3.org/2000/svg" | ||
61 | 10 | xmlns:sodipodi="http://sodipodi.sourceforge.net/DTD/sodipodi-0.dtd" | ||
62 | 11 | xmlns:inkscape="http://www.inkscape.org/namespaces/inkscape" | ||
63 | 12 | width="90" | ||
64 | 13 | height="90" | ||
65 | 14 | id="svg3140" | ||
66 | 15 | version="1.1" | ||
67 | 16 | inkscape:version="0.48+devel r12347" | ||
68 | 17 | sodipodi:docname="clear-search.svg"> | ||
69 | 18 | <defs | ||
70 | 19 | id="defs3142" /> | ||
71 | 20 | <sodipodi:namedview | ||
72 | 21 | id="base" | ||
73 | 22 | pagecolor="#ffffff" | ||
74 | 23 | bordercolor="#666666" | ||
75 | 24 | borderopacity="1.0" | ||
76 | 25 | inkscape:pageopacity="0.0" | ||
77 | 26 | inkscape:pageshadow="2" | ||
78 | 27 | inkscape:zoom="5.0931704" | ||
79 | 28 | inkscape:cx="42.7926" | ||
80 | 29 | inkscape:cy="50.793477" | ||
81 | 30 | inkscape:document-units="px" | ||
82 | 31 | inkscape:current-layer="layer1" | ||
83 | 32 | showgrid="true" | ||
84 | 33 | inkscape:window-width="1920" | ||
85 | 34 | inkscape:window-height="1029" | ||
86 | 35 | inkscape:window-x="0" | ||
87 | 36 | inkscape:window-y="24" | ||
88 | 37 | inkscape:window-maximized="1" | ||
89 | 38 | fit-margin-top="0" | ||
90 | 39 | fit-margin-left="0" | ||
91 | 40 | fit-margin-right="0" | ||
92 | 41 | fit-margin-bottom="0"> | ||
93 | 42 | <inkscape:grid | ||
94 | 43 | type="xygrid" | ||
95 | 44 | id="grid3178" | ||
96 | 45 | empspacing="6" | ||
97 | 46 | visible="true" | ||
98 | 47 | enabled="true" | ||
99 | 48 | snapvisiblegridlinesonly="true" | ||
100 | 49 | originx="0px" | ||
101 | 50 | originy="-1.7382813e-05px" /> | ||
102 | 51 | </sodipodi:namedview> | ||
103 | 52 | <metadata | ||
104 | 53 | id="metadata3145"> | ||
105 | 54 | <rdf:RDF> | ||
106 | 55 | <cc:Work | ||
107 | 56 | rdf:about=""> | ||
108 | 57 | <dc:format>image/svg+xml</dc:format> | ||
109 | 58 | <dc:type | ||
110 | 59 | rdf:resource="http://purl.org/dc/dcmitype/StillImage" /> | ||
111 | 60 | <dc:title></dc:title> | ||
112 | 61 | </cc:Work> | ||
113 | 62 | </rdf:RDF> | ||
114 | 63 | </metadata> | ||
115 | 64 | <g | ||
116 | 65 | inkscape:label="Layer 1" | ||
117 | 66 | inkscape:groupmode="layer" | ||
118 | 67 | id="layer1" | ||
119 | 68 | transform="translate(0,-962.36218)"> | ||
120 | 69 | <rect | ||
121 | 70 | style="color:#000000;fill:none;stroke:none;stroke-width:7.5;marker:none;visibility:visible;display:inline;overflow:visible;enable-background:accumulate" | ||
122 | 71 | id="rect4198" | ||
123 | 72 | width="90" | ||
124 | 73 | height="90" | ||
125 | 74 | x="0" | ||
126 | 75 | y="962.36218" /> | ||
127 | 76 | <g | ||
128 | 77 | id="g4978" | ||
129 | 78 | transform="translate(-60,548.00002)"> | ||
130 | 79 | <rect | ||
131 | 80 | style="color:#000000;fill:none;stroke:none;stroke-width:6;marker:none;visibility:visible;display:inline;overflow:visible;enable-background:accumulate" | ||
132 | 81 | id="rect3032" | ||
133 | 82 | width="90" | ||
134 | 83 | height="90" | ||
135 | 84 | x="0" | ||
136 | 85 | y="1.7382814e-05" | ||
137 | 86 | transform="translate(60,414.36216)" /> | ||
138 | 87 | <rect | ||
139 | 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" | ||
140 | 89 | id="rect3844" | ||
141 | 90 | width="90" | ||
142 | 91 | height="90.000015" | ||
143 | 92 | x="60.000004" | ||
144 | 93 | y="-504.36215" | ||
145 | 94 | transform="scale(1,-1)" /> | ||
146 | 95 | <path | ||
147 | 96 | sodipodi:type="arc" | ||
148 | 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" | ||
149 | 98 | id="path2995-0" | ||
150 | 99 | sodipodi:cx="35.999996" | ||
151 | 100 | sodipodi:cy="36.500011" | ||
152 | 101 | sodipodi:rx="33" | ||
153 | 102 | sodipodi:ry="33.5" | ||
154 | 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" | ||
155 | 104 | transform="matrix(1.0442733,0,0,1.0308021,67.406166,421.73787)" /> | ||
156 | 105 | <path | ||
157 | 106 | sodipodi:nodetypes="ccccc" | ||
158 | 107 | inkscape:connector-curvature="0" | ||
159 | 108 | id="path825" | ||
160 | 109 | d="M 116.68288,477.40901 86.953149,447.67927 93.317119,441.31531 123.04685,471.04504 Z" | ||
161 | 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" /> | ||
162 | 111 | <path | ||
163 | 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" | ||
164 | 113 | d="m 86.953149,471.04504 29.729741,-29.72973 6.36396,6.36397 L 93.317119,477.40901 Z" | ||
165 | 114 | id="path4002" | ||
166 | 115 | inkscape:connector-curvature="0" | ||
167 | 116 | sodipodi:nodetypes="ccccc" /> | ||
168 | 117 | </g> | ||
169 | 118 | </g> | ||
170 | 119 | </svg> |
30 + // use icon from icon-theme hasClearButton ? "clear-search" : ""
31 + name: control.
That's redundant, AbstractButton. visible already depends on that.