Announcement

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

    The height of SelectItem and SpinnerItem is not the same as in the previous version

    Hi Isomorphic,

    in the previous version of smartGWT, the width of SelectItem and SpinnerItem was the same in my app, but not in the current one (12.0p).
    Here you can see how it looks like now:

    Click image for larger version

Name:	spinner_width.png
Views:	220
Size:	1.2 KB
ID:	254411

    I think it just happens when TitleOrientation is TOP.
    Here is my test case:

    Code:
    package com.smartgwt.sample.client;
    
    import com.google.gwt.core.client.EntryPoint;
    import com.smartgwt.client.Version;
    import com.smartgwt.client.core.KeyIdentifier;
    import com.smartgwt.client.types.TitleOrientation;
    import com.smartgwt.client.util.Page;
    import com.smartgwt.client.util.PageKeyHandler;
    import com.smartgwt.client.util.SC;
    import com.smartgwt.client.widgets.IButton;
    import com.smartgwt.client.widgets.Window;
    import com.smartgwt.client.widgets.events.ClickEvent;
    import com.smartgwt.client.widgets.events.ClickHandler;
    import com.smartgwt.client.widgets.form.DynamicForm;
    import com.smartgwt.client.widgets.form.fields.SelectItem;
    import com.smartgwt.client.widgets.form.fields.SpinnerItem;
    import com.smartgwt.client.widgets.layout.VLayout;
    
    public class BuiltInDS extends VLayout implements EntryPoint {
        private IButton recreateBtn;
    
        public void onModuleLoad() {
            KeyIdentifier debugKey = new KeyIdentifier();
            debugKey.setCtrlKey(true);
            debugKey.setKeyName("D");
    
            Page.registerKey(debugKey, new PageKeyHandler() {
                public void execute(String keyName) {
                    SC.showConsole();
                }
            });
    
            setWidth100();
            setHeight100();
    
            recreateBtn = new IButton("Recreate");
            recreateBtn.addClickHandler(new ClickHandler() {
                @Override
                public void onClick(ClickEvent event) {
                    new MyWindow().show();
                }
            });
            addMember(recreateBtn);
            new MyWindow().show();
            draw();
        }
    
        private class MyWindow extends Window {
            public MyWindow() {
                setWidth(300);
                setHeight(300);
                setMembersMargin(0);
                setModalMaskOpacity(70);
                setTitle(" (" + Version.getVersion() + "/" + Version.getSCVersionNumber() + ")");
                setShowMinimizeButton(false);
                setIsModal(true);
                setShowModalMask(true);
                centerInPage();
    
                DynamicForm dF = new DynamicForm() {
                    {
                        setTitleOrientation(TitleOrientation.TOP);
    
                        SelectItem selectItem = new SelectItem("commonName");
                        selectItem.setWidth("*");
    
                        SpinnerItem spinnerItem = new SpinnerItem("commonName");
                        spinnerItem.setWidth("*");
    
                        setFields(selectItem, spinnerItem);
                    }
                };
    
                addItem(dF);
            }
        }
    }
    Best regards
    Pavo

    #2
    In my opinion, the width of ComboBoxItem and SelectItem looks the same as in the old version, only width of the SpinnerItem has changed.

    Comment


      #3
      We're not reproducing the difference you describe with your sample code. In our testing the SpinnerItem width is smaller than the SelectItem in both 12.0 and 11.1
      (Tested on Linux using FF61 and Chrome 67 and Windows 10 using FF61 and Chrome 68)

      The difference in appearance may be a result of different skins being loaded in your testing to ours or similar.
      Regardless, it seems likely this is easy to resolve by explicitly applying a width to your SpinnerItem. If you want to do this for all SpinnerItems you can use the setDefaultProperties() API to apply a standard width for all SpinnerItems

      Regards
      Isoorphic Software

      Comment


        #4
        Hi Isomorphic,

        please try this code in versions 12.0 and 11.1 and you'll see the problem I have in the screenshot.

        Code:
        isc.DynamicForm.create({
            ID:"test",
            width:500,
            colWidths: ["*", "*"],
            items:[
                {name:"selectItem",  editorType:"SelectItem",  width:"*", icons: [{name: "tel", src: "blank", inline: true, text: "✆", baseStyle: "telIcon"}], iconWidth: 16, iconHeight: 16},
                {name:"spinnerItem", editorType:"SpinnerItem", width:"*", icons: [{name: "tel", src: "blank", inline: true, text: "✆", baseStyle: "telIcon"}], iconWidth: 16, iconHeight: 16},
                {name:"comboBoxItem", editorType:"ComboBoxItem", width:"*", icons: [{name: "tel", src: "blank", inline: true, text: "✆", baseStyle: "telIcon"}], iconWidth: 16, iconHeight: 16},
            ]
        });
        Best regards
        Pavo

        Comment


          #5
          This issue is now resolved. Please try the next nightly build dated Aug 23 or above

          Regards
          Isomorphic Software

          Comment


            #6
            Hi Isomorphic,

            it's working now, thank you!

            Best regards
            Pavo

            Comment

            Working...
            X