Results 1 to 4 of 4

Thread: Button Icon not displaying fully

  1. #1
    Sencha Premium Member
    Join Date
    Aug 2012
    Posts
    14
    Vote Rating
    0
      0  

    Default Unanswered: Button Icon not displaying fully

    So I have buttons (pictured below). I used the Standard Button and have a cls applied to give it color/drop shadow/etc. I'm using icon to give it the image on top ("PLUMBER"), but it's only showing in the center and looks like it has a mask around it. And iconMask is unchecked.

    I am also using iconCls to try and give it dimensions but it's still not displaying properly.

    Any suggestions?



    button1.png
    Below is what I'm actually trying to put on top of the button in Architect

    button1-correct.png

    config.png



    Code:
    {
    xtype: 'panel',
    height: '300px',
    id: 'businessType',
    style: '',
    layout: {
    align: 'center',
    type: 'hbox'
    },
    items: [
    {
    xtype: 'button',
    cls: 'KOBbutton',
    height: '16%',
    id: 'BUILDER',
    left: '5%',
    styleHtmlContent: true,
    width: '90%',
    icon: 'resources/image/Blue-Plumbing2.png',
    iconCls: 'LargeButtonIcon',
    pressedCls: '"\''
    },


    CSS:
    .KOBbutton{
    background-size:100% 100% !important;
    background: #00476c !important;
    border: 1px solid #01273b !important;
    border-radius: 2px 2px 2px 2px !important;
    -webkit-box-shadow: 0px 1px 0px 1px #d2d2d2 !important;
    }

    LargeButtonIcon{
    width:561px !important;
    height:110px !important;
    background-size: 561px 110px;
    background-color:transparent!important;
    }

  2. #2
    Sencha - Sr Software Engineer mitchellsimoens's Avatar
    Join Date
    Mar 2007
    Location
    Gainesville, FL
    Posts
    39,411
    Answers
    3898
    Vote Rating
    1290
      0  

    Default

    Is the image sized properly when you inspect it?
    Mitchell Simoens @LikelyMitch
    Sencha Inc, Senior Software Engineer
    ________________
    Learn BBCode and use it!

    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 Premium Member
    Join Date
    Aug 2012
    Posts
    14
    Vote Rating
    0
      0  

    Default

    Hadn't checked that, but it doesn't look like it so I guess that's the problem.

    Is Architect automatically setting the image size to 30 x 30 px somewhere? I haven't set that size anywhere on my end. It seems that it is masking it somehow.

    Any suggestions?
    button-size.jpg

  4. #4
    Sencha Premium Member
    Join Date
    Aug 2012
    Posts
    14
    Vote Rating
    0
      0  

    Default

    Would this be a correct way of doing it instead of the icon?

    I have cleared the values for the following:
    cls: KOBbutton
    icon: (none)
    iconAlign: left
    iconCls: (none)
    iconMask: false


    and instead have used the HTML property to insert the following:
    <img src="resources/image/Blue-Plumbing.png" width="281" height="55">

    Will I run into problems doing it this way?

Tags for this Thread

Posting Permissions

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