Hybrid View

  1. #1
    Sencha User
    Join Date
    Oct 2011
    Posts
    10
    Vote Rating
    0
    johnterran is on a distinguished road

      0  

    Default Unanswered: Button icon 20 x 16 being cropped

    Unanswered: Button icon 20 x 16 being cropped


    Hi,

    I am a ExtJS newbie and I am trying to create a button with icon 20x16, but it is being cropped at 16px width.
    What is the best way to create a button that displays 20x16 icon?

    Thanks
    John

  2. #2
    Sencha - Senior Forum Manager mitchellsimoens's Avatar
    Join Date
    Mar 2007
    Location
    Gainesville, FL
    Posts
    36,801
    Answers
    3467
    Vote Rating
    834
    mitchellsimoens has a reputation beyond repute mitchellsimoens has a reputation beyond repute mitchellsimoens has a reputation beyond repute mitchellsimoens has a reputation beyond repute mitchellsimoens has a reputation beyond repute mitchellsimoens has a reputation beyond repute mitchellsimoens has a reputation beyond repute mitchellsimoens has a reputation beyond repute mitchellsimoens has a reputation beyond repute mitchellsimoens has a reputation beyond repute mitchellsimoens has a reputation beyond repute

      0  

    Default


    Icon should be 16x16... but you can change the CSS to fit what you need
    Mitchell Simoens @SenchaMitch
    Sencha Inc, Senior Forum Manager
    ________________
    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 in print!

    When posting code, please use BBCode's CODE tags.

  3. #3
    Sencha User
    Join Date
    Oct 2011
    Posts
    10
    Vote Rating
    0
    johnterran is on a distinguished road

      0  

    Default


    Could you give an example of how to do this? I am using ExtJS 4.0

    Thanks

  4. #4
    Sencha Premium Member skirtle's Avatar
    Join Date
    Oct 2010
    Location
    UK
    Posts
    3,588
    Answers
    540
    Vote Rating
    322
    skirtle has a brilliant future skirtle has a brilliant future skirtle has a brilliant future skirtle has a brilliant future skirtle has a brilliant future skirtle has a brilliant future skirtle has a brilliant future skirtle has a brilliant future skirtle has a brilliant future skirtle has a brilliant future skirtle has a brilliant future

      0  

    Default


    I don't have an example to hand but I can explain the technique.

    Break out Firebug or a similar tool and inspect the HTML elements used to create the button. See how the iconCls is applied and the styling used by the various elements to support a 16x16 icon. Adjust the styles inline in Firebug to get it looking the way you want. If all the styles you change are on elements below the iconCls then you just need to add the appropriate CSS rules to your stylesheet. However, if you need to change elements further up the chain then add a cls config to the button. This will add a CSS class to the outermost div. Your CSS selectors can then be written in terms of this class.

Thread Participants: 2

Tags for this Thread

Turkiyenin en sevilen filmlerinin yer aldigi xnxx internet sitemiz olan ve porn sex tarzi bir site olan mobil porno izle sitemiz gercekten dillere destan bir durumda herkesin sevdigi bir site olarak tarihe gececege benziyor. Sitenin en belirgin ozelliklerinden birisi de Turkiyede gercekten kaliteli ve muntazam, duzenli porno izle siteleri olmamasidir. Bu yuzden iste. Ayrica en net goruntu kalitesine sahip adresinde yayinlanmaktadir. Mesela diğer sitelerimizden bahsedecek olursak, en iyi hd porno video arşivine sahip bir siteyiz. "The Best anal porn videos and slut anus, big asses movies set..." hd porno faketaxi