1. #1
    Sencha Premium Member skirtle's Avatar
    Join Date
    Oct 2010
    Location
    UK
    Posts
    3,592
    Vote Rating
    323
    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 Button textAlign Doesn't Work

    Button textAlign Doesn't Work


    The button config setting textAlign no longer works. From a quick look at the code it seems that the bit that does this during rendering has been removed.

    Test case:

    Code:
    Ext.create('Ext.button.Button', {
        renderTo: Ext.getBody(),
        text: 'Click',
        textAlign: 'left',
        width: 200
    });
    I don't want to sound all preachy but I'm a little concerned if this wasn't picked up by either an automated test or QA. It's not a subtle failure.

  2. #2
    Sencha - Ext JS Dev Team Animal's Avatar
    Join Date
    Mar 2007
    Location
    Notts/Redwood City
    Posts
    30,502
    Vote Rating
    47
    Animal has a spectacular aura about Animal has a spectacular aura about

      0  

    Default


    Thanks for the early warning.

    examples/button/button.html is fairly comprehensive, and is checked for visual correctness.

    But I see now that it doesn't cover all cases.

    I'll expand it to use text alignment with various icon options.

  3. #3
    Sencha - Ext JS Dev Team Animal's Avatar
    Join Date
    Mar 2007
    Location
    Notts/Redwood City
    Posts
    30,502
    Vote Rating
    47
    Animal has a spectacular aura about Animal has a spectacular aura about

      0  

    Default


    It didn't appear to work in 4.0.2. I just added a textAlign: 'left' section to that test page and ran it under 4.0.2, and the alignment was center, so I think this is an old bug.

    I'll get it fixed though.

  4. #4
    Sencha Premium Member skirtle's Avatar
    Join Date
    Oct 2010
    Location
    UK
    Posts
    3,592
    Vote Rating
    323
    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


    According to the release notes this feature wasn't added till 4.0.4. It worked fine in 4.0.7.

  5. #5
    Sencha - Ext JS Dev Team Animal's Avatar
    Join Date
    Mar 2007
    Location
    Notts/Redwood City
    Posts
    30,502
    Vote Rating
    47
    Animal has a spectacular aura about Animal has a spectacular aura about

      0  

    Default


    Well the code was there. I'd just made an error... It's getBtnClass that has to create a class name for the button element based upon the textAlign property.. Duh!

Thread Participants: 1