View Full Version : iconCls

8 Feb 2011, 1:10 AM
Hello all,

I see many pictos added to the newest version of ST, but i can't use them by using iconCls:'speedometer1' or something like that.

I changed iconCls to icon with a ref to the png like this:

id: 'Info',
icon: '/icamsbase/mobile/img/speedometer1.png',
text: text.get('menu_info'),
handler: menuHandler

but this leads to :


see attach,

Any ideas how to fix ?


8 Feb 2011, 3:05 AM
Sencha.css only embeds a few of the icons. You can either regenerate the css to embed all the icons you are going to use (see an introduction to SASS here: http://www.sencha.com/blog/an-introduction-to-theming-sencha-touch/), or just create a new class in your custom CSS. For example:

.speedometer1 {-webkit-mask-box-image: url(/icamsbase/mobile/img/speedometer1.png)}

With the previous line of CSS, you can use the new icon just assigning iconCls: 'speedometer1' to the Panel/Component (basically, you are just assigning a CSS class with iconCls).