jeffbvox
28 Dec 2010, 6:53 PM
Can anyone point me in the direction of a sample or give an example of a button with a custom mask applied to it. I've tried several variations of creating a button with iconMask set to true and iconMaskCls set, but I can't seem to get it to work. Here's an example of one of my attempts:
Code:
var addSubCommentButton = new Ext.Button({
iconMaskClass: 'addComment',
iconMask: true,
height: 50,
width: 50,
listeners: {
click: {
element: 'el',
fn:SubCommentClicked,
scope: this
}
}
});
CSS:
.addComment {
-webkit-mask-image: url('images/buttons/CommentToFansComment48X44.png');
-webkit-mask-box-image: url('images/buttons/CommentToFansComment48X44.png');
-webkit-mask-size: 30px 30px;
-webkit-mask-repeat: no-repeat;
-webkit-mask-origin: content;
}
Thanks for helping a sencha noobie out!
Code:
var addSubCommentButton = new Ext.Button({
iconMaskClass: 'addComment',
iconMask: true,
height: 50,
width: 50,
listeners: {
click: {
element: 'el',
fn:SubCommentClicked,
scope: this
}
}
});
CSS:
.addComment {
-webkit-mask-image: url('images/buttons/CommentToFansComment48X44.png');
-webkit-mask-box-image: url('images/buttons/CommentToFansComment48X44.png');
-webkit-mask-size: 30px 30px;
-webkit-mask-repeat: no-repeat;
-webkit-mask-origin: content;
}
Thanks for helping a sencha noobie out!