Browse Source

REPORT-1808 字体,背景

1.字体设置之后的控件的宽度,导致设计器端的显示异常。
2.背景设置恢复默认之后,后台的属性设置为空。
master
lee 8 years ago
parent
commit
a2a7a6bd15
  1. 2
      designer_form/src/com/fr/design/designer/creator/cardlayout/XCardSwitchButton.java
  2. 3
      designer_form/src/com/fr/design/designer/creator/cardlayout/XWTabFitLayout.java

2
designer_form/src/com/fr/design/designer/creator/cardlayout/XCardSwitchButton.java

@ -376,7 +376,7 @@ public class XCardSwitchButton extends XButton {
XCardSwitchButton temp = (XCardSwitchButton) this.tagLayout.getComponent(i);
CardSwitchButton tempCard = (CardSwitchButton) temp.toData();
String tempText = tempCard.getText();
Font f = ((CardSwitchButton)this.toData()).getFont();
Font f = tempCard.getFont();
FontMetrics fm = GraphHelper.getFontMetrics(f);
cardWidth.put(i,fm.stringWidth(tempText));
cardHeight.put(i,fm.getHeight());

3
designer_form/src/com/fr/design/designer/creator/cardlayout/XWTabFitLayout.java

@ -237,6 +237,9 @@ public class XWTabFitLayout extends XWFitLayout {
this.xCardSwitchButton.setCustomStyle(false);
this.xCardSwitchButton.setSelectBackground(bg);
this.xCardSwitchButton.getLabel().setFont(DEFAULTFT);
cardSwitchButton.setInitialBackground(null);
cardSwitchButton.setClickBackground(null);
cardSwitchButton.setOverBackground(null);
cardSwitchButton.setFont(DEFAULT_FRFT);
} else {
Background initialBackground = cardSwitchButton.getInitialBackground();

Loading…
Cancel
Save