From a2a7a6bd155c5bd97ac181cc37b4e603affde8d7 Mon Sep 17 00:00:00 2001 From: lee <854954082@qq.com> Date: Tue, 17 Jan 2017 16:17:04 +0800 Subject: [PATCH] =?UTF-8?q?REPORT-1808=20=E5=AD=97=E4=BD=93=EF=BC=8C?= =?UTF-8?q?=E8=83=8C=E6=99=AF?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit 1.字体设置之后的控件的宽度,导致设计器端的显示异常。 2.背景设置恢复默认之后,后台的属性设置为空。 --- .../design/designer/creator/cardlayout/XCardSwitchButton.java | 2 +- .../fr/design/designer/creator/cardlayout/XWTabFitLayout.java | 3 +++ 2 files changed, 4 insertions(+), 1 deletion(-) diff --git a/designer_form/src/com/fr/design/designer/creator/cardlayout/XCardSwitchButton.java b/designer_form/src/com/fr/design/designer/creator/cardlayout/XCardSwitchButton.java index 6bc1de727b..6c55ee045e 100644 --- a/designer_form/src/com/fr/design/designer/creator/cardlayout/XCardSwitchButton.java +++ b/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()); diff --git a/designer_form/src/com/fr/design/designer/creator/cardlayout/XWTabFitLayout.java b/designer_form/src/com/fr/design/designer/creator/cardlayout/XWTabFitLayout.java index 7276df53de..ccdf7dd07b 100644 --- a/designer_form/src/com/fr/design/designer/creator/cardlayout/XWTabFitLayout.java +++ b/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();