Browse Source

REPORT-576 font代码调整

master
PanLi320 8 years ago
parent
commit
a869832d99
  1. 3
      designer_form/src/com/fr/design/designer/creator/cardlayout/XCardSwitchButton.java

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

@ -31,7 +31,6 @@ import com.fr.form.ui.container.cardlayout.WTabFitLayout;
import com.fr.general.Background; import com.fr.general.Background;
import com.fr.general.FRFont; import com.fr.general.FRFont;
import com.fr.general.Inter; import com.fr.general.Inter;
import sun.font.FontDesignMetrics;
/** /**
* *
@ -352,7 +351,7 @@ public class XCardSwitchButton extends XButton {
CardSwitchButton tempCard = (CardSwitchButton) temp.toData(); CardSwitchButton tempCard = (CardSwitchButton) temp.toData();
String tempText = tempCard.getText(); String tempText = tempCard.getText();
Font f = ((CardSwitchButton)this.toData()).getFont(); Font f = ((CardSwitchButton)this.toData()).getFont();
FontMetrics fm = FontDesignMetrics.getMetrics(f); FontMetrics fm = Toolkit.getDefaultToolkit().getFontMetrics(f);
cardWidth.put(i,fm.stringWidth(tempText)); cardWidth.put(i,fm.stringWidth(tempText));
cardHeight.put(i,fm.getHeight()); cardHeight.put(i,fm.getHeight());
} }

Loading…
Cancel
Save