Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(207)

Side by Side Diff: sky/framework/sky-icon.sky

Issue 961873004: sky-element stocks demo: add splashes and highlights to menu items (Closed) Base URL: https://github.com/domokit/mojo.git@master
Patch Set: Created 5 years, 9 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
« no previous file with comments | « sky/framework/sky-drawer.sky ('k') | sky/framework/sky-menu-item.sky » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 <!-- 1 <!--
2 // Copyright 2015 The Chromium Authors. All rights reserved. 2 // Copyright 2015 The Chromium Authors. All rights reserved.
3 // Use of this source code is governed by a BSD-style license that can be 3 // Use of this source code is governed by a BSD-style license that can be
4 // found in the LICENSE file. 4 // found in the LICENSE file.
5 --> 5 -->
6 <import src="sky-element.sky" /> 6 <import src="sky-element.sky" />
7 7
8 <sky-element attributes="type:string, size:number"> 8 <sky-element attributes="type:string, size:number">
9 <template> 9 <template>
10 <img /> 10 <img />
(...skipping 27 matching lines...) Expand all
38 _setSize(size); 38 _setSize(size);
39 _setSrc(type, size); 39 _setSrc(type, size);
40 } 40 }
41 41
42 void typeChanged(String oldValue, String newValue) { 42 void typeChanged(String oldValue, String newValue) {
43 if (_img != null) 43 if (_img != null)
44 _setSrc(newValue, size.floor()); 44 _setSrc(newValue, size.floor());
45 } 45 }
46 46
47 void sizeChanged(double oldValue, double newValue) { 47 void sizeChanged(double oldValue, double newValue) {
48 if (_img != null) 48 if (_img != null) {
49 _setSize(newValue.floor()); 49 _setSize(newValue.floor());
50 _setSrc(type, newValue.floor());
51 }
50 } 52 }
51 } 53 }
52 54
53 _init(script) => register(script, SkyIcon); 55 _init(script) => register(script, SkyIcon);
54 </script> 56 </script>
55 </sky-element> 57 </sky-element>
OLDNEW
« no previous file with comments | « sky/framework/sky-drawer.sky ('k') | sky/framework/sky-menu-item.sky » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698