-
13 Dec 2011 6:54 AM #1
xtype: 'button' iconMask: false does not remain when button is pressed
xtype: 'button' iconMask: false does not remain when button is pressed
I have added my own icons for zoom in and out. setting iconMask to false removes the background-color: 'white'. Which displays the icon correctly.
{
xtype: 'button',
icon: 'images/zoomin24.png',
iconMask: false,
itemId: 'zin',
ui: 'plain',
align: 'right'
}
However the background-color: 'white' is restored once the button is pressed. This shows up as a white box surrounding the icon. This can be recreated by adding x-button-pressed to the config.
{
xtype: 'button',
cls: 'x-button-pressed',
icon: 'images/zoomin24.png',
iconMask: false,
itemId: 'zin',
ui: 'plain',
align: 'right'
}
I think once the iconMask set to false it should also apply when the button is pressed. Is this an incorrect assumption? I would like my custom icons to behave the same as the default icons. This does not work in 1.1 either.
Thanks
-
13 Dec 2011 7:14 AM #2Sencha - Senior Forum Manager
- Join Date
- Mar 2007
- Location
- St. Louis, MO
- Posts
- 33,714
- Vote Rating
- 438
Looks like 'x-button-pressed' is setting a white background for me. Further more, after I press the button, the 'x-button-press' CSS is removed as expected so I'm seeing the expected behavior.
Mitchell Simoens @SenchaMitch
Sencha Inc, Senior Forum Manager
________________
http://www.JSONPLint.com - Source to lint your JSONP!
Check out my GitHub, lots of nice things for Ext JS 4 and Sencha Touch 2
https://github.com/mitchellsimoens
Think my support is good? Get more personalized support via a support subscription. https://www.sencha.com/store/
Need more help with your app? Hire Sencha Services services@sencha.com
Want to learn Sencha Touch 2? Check out Sencha Touch in Action that is almost in print!
When posting code, please use BBCode's CODE tags.
-
13 Dec 2011 10:09 AM #3
I agree. I've fixed this internally and will be available in the next release.
For now, you can simply go into button.scss in the Touch SDK and replace line 237:
With this:Code:.x-button-icon {
Code:.x-button-icon.x-button-mask {Sencha Inc.
Robert Dougan - @rdougan
Sencha Touch 2 and Ext JS 4 Core Team Member, SASS/Theming Wizard.
-
13 Dec 2011 10:56 AM #4
Thanks I will give that a try.
I added a local CSS but am not sure of the side effects but it is working
Code:.x-button-icon { background-color: transparent !important; }
Success! Looks like we've fixed this one. According to our records the fix was applied for
TOUCH-1251
in
2.0.


Reply With Quote