user2061107
user2061107

Reputation: 21

adding icon to tabs in sencha touch 2

I have set custom icon to tabs, but it takes the blue color of tab panel, how can i get the original color of the icons.

var tabPanel = Ext.create('Ext.TabPanel',{
tabBarPosition: 'bottom',                                                   
items:[
{   
title:'General',
iconCls:'icongen',
}

my css code

.icongen
{
   -webkit-mask-box-image: url("resources/images/general.png");
}

Upvotes: 1

Views: 2820

Answers (2)

ThinkFloyd
ThinkFloyd

Reputation: 5021

This is how I would do, add the following to your css:

.x-tab .x-button-icon.icongen, .x-button .x-button-icon.x-icon-mask.icongen {
-webkit-mask-image: url(<PATH TO IMAGE>);
}

along with iconCls you might also have to use iconMask: true

Upvotes: 1

1Mayur
1Mayur

Reputation: 3485

.icongen
{
   background-image: url("resources/images/general.png");
}

use this :) this will solve your problem

Upvotes: 2

Related Questions