diff --git a/designer/src/com/fr/design/mainframe/alphafine/cell/render/TitleCellRender.java b/designer/src/com/fr/design/mainframe/alphafine/cell/render/TitleCellRender.java index ca1890ea82..c5329da68c 100644 --- a/designer/src/com/fr/design/mainframe/alphafine/cell/render/TitleCellRender.java +++ b/designer/src/com/fr/design/mainframe/alphafine/cell/render/TitleCellRender.java @@ -12,6 +12,7 @@ import java.awt.*; * Created by XiaXiang on 2017/4/20. */ public class TitleCellRender implements ListCellRenderer { + private static final int LOAD_OFFSET = 28; @Override public Component getListCellRendererComponent(JList list, Object value, int index, boolean isSelected, boolean cellHasFocus) { @@ -23,9 +24,9 @@ public class TitleCellRender implements ListCellRenderer { panel.setBorder(BorderFactory.createEmptyBorder(0, 10, 0, 0)); titleLabel.setText(moreModel.getName()); titleLabel.setFont(AlphaFineConstants.SMALL_FONT); + titleLabel.setForeground(AlphaFineConstants.DARK_GRAY); showMoreLabel.setFont(AlphaFineConstants.SMALL_FONT); showMoreLabel.setText(moreModel.getContent()); - titleLabel.setForeground(AlphaFineConstants.DARK_GRAY); showMoreLabel.setForeground(AlphaFineConstants.DARK_GRAY); panel.add(titleLabel, BorderLayout.WEST); if (moreModel.isNeedMore()) { @@ -37,7 +38,8 @@ public class TitleCellRender implements ListCellRenderer { //设置cell的加载动画 imageIcon.setImageObserver(list); UILabel loadingLabel = new UILabel(imageIcon); - panel.add(loadingLabel, BorderLayout.SOUTH); + loadingLabel.setBorder(BorderFactory.createEmptyBorder(LOAD_OFFSET,0,0,0)); + panel.add(loadingLabel, 0); } panel.setPreferredSize(new Dimension(list.getFixedCellWidth(), AlphaFineConstants.CELL_TITLE_HEIGHT)); return panel;