Thank you for reporting this bug. We will make it our priority to review this report.
  1. #1
    Sencha User
    Join Date
    Oct 2012
    Location
    Belarus, Minsk
    Posts
    15
    Vote Rating
    1
    karenina is on a distinguished road

      0  

    Default ButtonCellDefaultAppearance: problems with icon display

    ButtonCellDefaultAppearance: problems with icon display


    I need to set only icon to button, and no text. Also, I need this button to be TextButton.
    Following situation: I place icon, and I dont place any text to it.
    Result - I see empty space on the right. When I am looking on it in firebug, it shows empty <td> tag.
    According to sources of gxt:
    Code:
      public void render(final ButtonCell<C> cell, Context context, C value, SafeHtmlBuilder sb) {
        String constantHtml = cell.getHTML();
        boolean hasConstantHtml = constantHtml != null && constantHtml.length() != 0;
        boolean isBoolean = value != null && value instanceof Boolean;
        // is a boolean always a toggle button?
        String text = hasConstantHtml ? cell.getText() : (value != null && !isBoolean)
            ? SafeHtmlUtils.htmlEscape(value.toString()) : "";
    variable text is never null. But below, in the same method we see:
    Code:
            case LEFT:
              inside.appendHtmlConstant("<tr>");
              writeIcon(inside, icon, height);
              if (text != null) {
                int w = width - (icon != null ? icon.getWidth() : 0) - 4;
                writeText(inside, text, w, height);
              }
    It is checked on null, but it is never null it self. That is why we see empty space on button.

    Does any workaround exist?

  2. #2
    Sencha - GXT Dev Team
    Join Date
    Feb 2009
    Location
    Minnesota
    Posts
    2,731
    Vote Rating
    90
    Colin Alworth is a glorious beacon of light Colin Alworth is a glorious beacon of light Colin Alworth is a glorious beacon of light Colin Alworth is a glorious beacon of light Colin Alworth is a glorious beacon of light

      0  

    Default


    If not displaying text, why are you using a TextButton? Why not IconButton or ToolButton?

  3. #3
    Sencha User
    Join Date
    Oct 2012
    Location
    Belarus, Minsk
    Posts
    15
    Vote Rating
    1
    karenina is on a distinguished road

      0  

    Default


    In future we can use both text and icon there(and there is possibility for customer to add this text)

Thread Participants: 1

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