Results 1 to 3 of 3

Thread: [PR 1] Button -> iconAlign

    Success! Looks like we've fixed this one. According to our records the fix was applied for TOUCH-887 in a recent build.
  1. #1
    Sencha User tobiu's Avatar
    Join Date
    May 2007
    Location
    Munich (Germany)
    Posts
    2,751
    Vote Rating
    129
      0  

    Default [PR 1] Button -> iconAlign

    hi team,

    not working for me! i tried
    Code:
    iconAlign : top
    inside the config-object or direct, the icon always renders at the left side.
    Best regards
    Tobias Uhlig

  2. #2
    Sencha User tobiu's Avatar
    Join Date
    May 2007
    Location
    Munich (Germany)
    Posts
    2,751
    Vote Rating
    129
      0  

    Default

    not sure if this fix is perfect, but it will point you into the right direction.

    first: iconCls does count (not only icon):

    Code:
    Ext.Button.override({
        updateIconAlign: function(alignment, oldAlignment) {
            var element = this.element,
                baseCls = Ext.baseCSSPrefix + 'iconalign-';
    
            element.removeCls(baseCls + oldAlignment);
            if (this.getIcon() || this.getIconCls()) {
                element.addCls(baseCls + alignment);
            }
        }
    });
    but this messes up the css a bit more. the following class was valid for ST 1.x:

    Code:
    .x-iconalign-left, .x-iconalign-top {
        -webkit-box-direction: reverse;
        box-direction: reverse;
    }
    in ST 2, it changes left to right and top to bottom.

    so with replacing it to:

    Code:
    .x-iconalign-left, .x-iconalign-top {
        -webkit-box-direction: normal;
        box-direction: normal;
    }
    i get quite close.
    Best regards
    Tobias Uhlig

  3. #3
    Sencha User rdougan's Avatar
    Join Date
    Oct 2008
    Posts
    1,159
    Vote Rating
    10
      0  

    Default

    That just about fixed it. I just needed to add a little extra polish to allow for center aligned icons (when there is no text).

    Thanks!

Posting Permissions

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