1. #1
    Sencha Premium Member
    Join Date
    Aug 2012
    Posts
    14
    Vote Rating
    0
    alex.mcneal is on a distinguished road

      0  

    Default Unanswered: Button Icon not displaying fully

    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 - Senior Forum Manager mitchellsimoens's Avatar
    Join Date
    Mar 2007
    Location
    Gainesville, FL
    Posts
    37,642
    Vote Rating
    899
    Answers
    3574
    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


    Is the image sized properly when you inspect it?
    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 Premium Member
    Join Date
    Aug 2012
    Posts
    14
    Vote Rating
    0
    alex.mcneal is on a distinguished road

      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
    alex.mcneal is on a distinguished road

      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?

Thread Participants: 1

Tags for this Thread