Announcement

Collapse
No announcement yet.
X
  • Filter
  • Time
Clear All
new posts

    Dialog.setIconSize ignored

    1. SmartClient Version: SNAPSHOT_v10.1d_2014-10-12/LGPL Development Only (built 2014-10-12)
    the same problem exists for 4.1p
    2. Firefox 24.5.0 on Gentoo linux
    3.
    4.
    5.
    Code:
    12:18:27.397:INFO:Log:initialized
    12:18:27.402:WARN:Log:New Class ID: 'Set' collides with ID of existing object with value 'function Set() {
        [native code]
    }'.  Existing object will be replaced.
    This conflict would be avoided by disabling ISC Simple Names mode.  See documentation for further information.
    12:18:29.542:INFO:Log:isc.Page is loaded

    6.
    Code:
    package pl.com.tech4.client;
    
    import com.google.gwt.core.client.EntryPoint;
    import com.google.gwt.user.client.DOM;
    import com.smartgwt.client.util.SC;
    import com.smartgwt.client.widgets.Dialog;
    
    public class MainEntryPoint implements EntryPoint {
       
        public void onModuleLoad() {
    
            DOM.getElementById("loadingPicture").removeFromParent();
            layout();
            SC.showConsole();
        }
       
        private void layout() {
    
            Dialog dialog = new Dialog();
            dialog.setButtons(Dialog.OK);
            dialog.setIcon("[SKINIMG]Dialog/say.png");
            dialog.setIconSize(200); //does not work
            dialog.setMessage("message");
            dialog.show();
        }
    }
    According to the docs:
    Code:
    public void setIconSize(int iconSize)
                     throws IllegalStateException
    
    Size of the icon to show in this dialog.
    
    Parameters:
        iconSize - Default value is 32
    but it looks like this is ignored and defaults to 32px always (see attached pic).
    Thanks,
    MichalG
    Attached Files

    #2
    You can get around this by setting width and height on the dialog.messageIcon AutoChild of the Dialog (see AutoChild overview in JavaDoc if you are unfamiliar with this system).

    We'll take a look at fixing the iconSize property, which should also have worked for this purpose.

    Comment


      #3
      We have fixed the issue with iconSize and you will find the patch applied to the next nightly build, so the code sample that you posted should work now as expected.

      Comment


        #4
        It is working against:
        SmartClient Version: v9.1p_2014-10-20/LGPL Development Only (built 2014-10-20)
        SmartClient Version: v10.0p_2014-10-21/LGPL Development Only (built 2014-10-21)
        Thanks,
        MichalG

        Comment

        Working...
        X