Results 1 to 4 of 4

Thread: How to set button icon size

  1. #1

    Default How to set button icon size

    Hi,

    I would really like to use the nice Ext.Button class for my buttons because it is so feature rich. However, I would require precise control over the icon dimensions or else my custom pre-made icons don't look so nice. I specify my icons via the "icon" Attribute.

    Could anyone give me a quick pointer?


    Thank you!

    Hildegard von Bingen

  2. #2
    Sencha User
    Join Date
    Jul 2011
    Location
    Holland
    Posts
    98
    Answers
    2

    Default

    Since Sencha Touch 2.2, icon's are just font-characters. If your icons are font-based you can change the icon size by changing the font-size of the icon element, using your SCSS file.

    Example:
    PHP Code:
    items: [                    
    {
         
    xtype'button',                        
         
    text'Select',            
         
    iconCls'select'                    
    }

    In your (s)css file:
    PHP Code:
    .select{  
        
    font-size:3em;

    That's all.

  3. #3

    Default Re

    Hi,

    thanks for your answer.
    I'm sorry but it's not the answer to my question. I am using the icon property with a URL:

    I need to set icon SIZE and ideally icon SCALE like I would be able to with an img tag:

    {
    xtype: 'button',
    cls: 'toolbarbutton',
    text: "Profil",
    icon: 'resources/icons/MenuToolbar/profile_38_48.png',
    iconAlign: 'top',
    border: 0,
    },

  4. #4
    Sencha User
    Join Date
    Nov 2010
    Posts
    448

    Default

    Bump;I have the same issue now...your help is appreciated.

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •