Search code examples
javascriptextjssencha-touchsencha-touch-2sencha-touch-theming

How to change the dimension for a button in Sencha Touch


I have this button in Sencha Touch 2, I would need to resize to "small"I need change its height. Could you please provide me a sample of code? thanks

  navigationBar: {

        items:[{
            xtype: 'button',              
            text: 'Settings',
            itemId: 'settingsButton',
            align: 'right',
            iconMask: true,
            iconCls: 'settings9'
        }],
        ui: 'custom-toolbar-top-1L'
    },

Solution

  • Good practice to do this with css, or more precise with Sencha Theming.

    Start point to your question is Sencha Kitchen sink samples

    In short you have to add ui: 'small' to button's configuration

    Cheers, Oleg