GXT组合框选择箭头未在GXT4.0中正确对齐

时间:2016-11-11 12:07:46

标签: css gwt gxt

我已将GXT从3.0升级到4.0,并且combox框箭头显示在图像enter image description here

在GXT3.0中工作正常。在GXT4.0中,它在GWT Debug模式下显示得很好。

我使用以下链接创建了组合框。 http://examples.sencha.com/gxt/4.0.0/#ExamplePlace:comboboxstyled

**I am using gray theme.** 

gxt-all.css文件

我已经将以下Css应用于组合框,但我不确定它是否正在应用。

.x-combo-list {
    border-color:#98c0f4;
    background-color:#ddecfe;
    font:normal 12px tahoma, arial, helvetica, sans-serif;
}

.x-combo-list-inner {
    background-color:#fff;
}

.x-combo-list-hd {
    font:bold 11px tahoma, arial, helvetica, sans-serif;
    color:#15428b;
    background-image: url(../images/default/layout/panel-title-light-bg.gif);
    border-bottom-color:#98c0f4;
}

.x-resizable-pinned .x-combo-list-inner {
    border-bottom-color:#98c0f4;
}

.x-combo-list-item {
    border-color:#fff;
}

.x-combo-list .x-combo-selected{
    border-color:#a3bae9 !important;
    background-color:#dfe8f6;
}

.x-combo-list .x-toolbar {
    border-top-color:#98c0f4;
}

.x-combo-list-small {
    font:normal 11px tahoma, arial, helvetica, sans-serif;
}

/////////////////////////////////////////////////////////////////

**CustomComboBoxView.css file**

@eval borderColor com.sencha.gxt.core.client.resources.ThemeStyles.get().borderColor();

.view {
  background-color: white;
  border: 1px solid borderColor;
  -moz-outline: none;
  outline: 0 none;
  position: relative;
}

@if (is("ie6"))  {
  .view {
    overflow: auto; 
  }
} @else {
  .view {
    overflow-y: auto; 
  }
}

.item {
   border: 1px solid #FFFFFF;
    font-family: tahoma, arial, helvetica, sans-serif;
    font-size: 12px;
    font-size-adjust: none;
    font-stretch: normal;
    font-style: normal;
    font-variant: normal;
    font-weight: normal;
    line-height: normal;
    overflow: auto;
    padding: 2px;
    white-space: normal;
    cursor: pointer;
}

.over {
  gwt-image: 'selectedBackground';
  height: auto;
  border: 1px dotted #DDDDDD !important;
  cursor: pointer;
}

.sel {
  background: none repeat scroll 0 50% #DFE8F6;
  border: 1px dotted #A3BAE9 !important;
  cursor: pointer;
}

////////////////////////////////////////////////////

EntryPointSample Class file

      public interface CustomListViewResources extends
        ListViewDefaultResources {

             @Override
            @Source({"com/test/sample/clients/gwt/client/panel/CustomComboBoxView.css"})
          CustomListViewStyle css();

         }

         interface CustomListViewStyle extends
         ListViewDefaultAppearance.ListViewDefaultStyle { }


        private final SampleProperties sampleProperties = GWT.create(SampleProperties.class);
        private ComboBox<Sample> SampleComboBox;


        final ListViewDefaultResources resources = GWT.create(CustomListViewResources.class);


        final ListViewDefaultAppearance<Sample> appearance = new ListViewDefaultAppearance<Sample>(resources);

        final ListView<Sample, String> listView =
                        new ListView<Sample, String>(sampleLocationListStore, sampleProperties.name(),
                        appearance);

        sampleComboBox =
                        new ComboBox<Sample>(sampleLocationListStore, sampleProperties.nameLabel(), listView);
        sampleComboBox.setWidth(150);
        sampleComboBox.setTypeAhead(true);

        sampleComboBox.setTriggerAction(ComboBoxCell.TriggerAction.ALL);

        sampleComboBox.addSelectionHandler(new SelectionHandler<Sample>() {
            @Override
            public void onSelection(SelectionEvent<Sample> companySelectionEvent) {


              }
            });

        testDropdownLabel = new FieldLabel(sampleComboBox, constants.labelTest());
        testDropdownLabel.setLabelWidth(50);
        widget.add(testDropdownLabel);

0 个答案:

没有答案