Browse Source

Merge pull request #668 in DESIGN/design from ~KERRY/design_10.0:release/10.0 to release/10.0

* commit '4e40e10c53650cdaedbb01d2eab453e0b6055b22':
  REPORT-13340 移动端属性》tab样式多样化》滑动式和上菜单式 预览区域显示异常
  REPORT-13176 移动端属性》tab样式多样化》默认样式》预览处字体太小,如截图
  MOBILE-18551 移动端》决策报表》tab样式多样化》设置tab的字符颜色、斜体颜色无效
bugfix/10.0
kerry 6 years ago
parent
commit
3812da6a3e
  1. 4
      designer-base/src/main/java/com/fr/design/mainframe/mobile/ui/DefaultMobileStyleDefinePane.java
  2. 2
      designer-base/src/main/java/com/fr/design/mainframe/mobile/ui/DownMenuStyleDefinePane.java
  3. 4
      designer-base/src/main/java/com/fr/design/mainframe/mobile/ui/MobileTemplateStyleDefinePane.java
  4. 2
      designer-base/src/main/java/com/fr/design/mainframe/mobile/ui/SliderStyleDefinePane.java
  5. 6
      designer-base/src/main/java/com/fr/design/mainframe/mobile/ui/StyleDefinePaneWithSelectConf.java
  6. 4
      designer-base/src/main/java/com/fr/design/mainframe/mobile/ui/UpMenuStyleDefinePane.java

4
designer-base/src/main/java/com/fr/design/mainframe/mobile/ui/DefaultMobileStyleDefinePane.java

@ -12,6 +12,7 @@ import java.awt.Dimension;
import java.awt.FontMetrics; import java.awt.FontMetrics;
import java.awt.Graphics; import java.awt.Graphics;
import java.awt.Graphics2D; import java.awt.Graphics2D;
import java.awt.RenderingHints;
public class DefaultMobileStyleDefinePane extends MobileTemplateStyleDefinePane { public class DefaultMobileStyleDefinePane extends MobileTemplateStyleDefinePane {
@ -84,7 +85,8 @@ public class DefaultMobileStyleDefinePane extends MobileTemplateStyleDefinePane
int panelWidth = dimension.width; int panelWidth = dimension.width;
int panelHeight = dimension.height; int panelHeight = dimension.height;
Graphics2D g2d = (Graphics2D) g.create(); Graphics2D g2d = (Graphics2D) g.create();
FRFont frFont = DefaultMobileTemplateStyle.DEFAULT_TAB_FONT.getFont(); g2d.setRenderingHint(RenderingHints.KEY_ANTIALIASING, RenderingHints.VALUE_ANTIALIAS_ON);
FRFont frFont = this.getTabFontConfig().getFont();
FontMetrics fm = GraphHelper.getFontMetrics(frFont); FontMetrics fm = GraphHelper.getFontMetrics(frFont);
WCardTagLayout cardTagLayout = DefaultMobileStyleDefinePane.this.getTagLayout(); WCardTagLayout cardTagLayout = DefaultMobileStyleDefinePane.this.getTagLayout();
int eachWidth = panelWidth / cardTagLayout.getWidgetCount(); int eachWidth = panelWidth / cardTagLayout.getWidgetCount();

2
designer-base/src/main/java/com/fr/design/mainframe/mobile/ui/DownMenuStyleDefinePane.java

@ -27,6 +27,7 @@ import java.awt.FlowLayout;
import java.awt.FontMetrics; import java.awt.FontMetrics;
import java.awt.Graphics; import java.awt.Graphics;
import java.awt.Graphics2D; import java.awt.Graphics2D;
import java.awt.RenderingHints;
import java.awt.Stroke; import java.awt.Stroke;
import java.util.ArrayList; import java.util.ArrayList;
@ -151,6 +152,7 @@ public class DownMenuStyleDefinePane extends StyleDefinePaneWithSelectConf {
int panelWidth = dimension.width; int panelWidth = dimension.width;
int panelHeight = dimension.height; int panelHeight = dimension.height;
Graphics2D g2d = (Graphics2D) g.create(); Graphics2D g2d = (Graphics2D) g.create();
g2d.setRenderingHint(RenderingHints.KEY_ANTIALIASING, RenderingHints.VALUE_ANTIALIAS_ON);
FRFont frFont = this.getTabFontConfig().getFont(); FRFont frFont = this.getTabFontConfig().getFont();
FontMetrics fm = GraphHelper.getFontMetrics(frFont); FontMetrics fm = GraphHelper.getFontMetrics(frFont);
WCardTagLayout cardTagLayout = DownMenuStyleDefinePane.this.getTagLayout(); WCardTagLayout cardTagLayout = DownMenuStyleDefinePane.this.getTagLayout();

4
designer-base/src/main/java/com/fr/design/mainframe/mobile/ui/MobileTemplateStyleDefinePane.java

@ -208,8 +208,10 @@ public abstract class MobileTemplateStyleDefinePane extends BasicBeanPane<Mobile
MobileTemplateStyle ob = updateSubStyle(); MobileTemplateStyle ob = updateSubStyle();
ob.setCustom(custom.getSelectedIndex() == 1); ob.setCustom(custom.getSelectedIndex() == 1);
ob.setInitialColor(initialColorBox.getSelectObject()); ob.setInitialColor(initialColorBox.getSelectObject());
TabFontConfig config = ob.getTabFontConfig(); TabFontConfig config = new TabFontConfig();
config.setSelectColor(ob.getTabFontConfig().getSelectColor());
config.setFont(fontConfPane.update()); config.setFont(fontConfPane.update());
ob.setTabFontConfig(config);
return ob; return ob;
} }

2
designer-base/src/main/java/com/fr/design/mainframe/mobile/ui/SliderStyleDefinePane.java

@ -24,6 +24,7 @@ import java.awt.FlowLayout;
import java.awt.FontMetrics; import java.awt.FontMetrics;
import java.awt.Graphics; import java.awt.Graphics;
import java.awt.Graphics2D; import java.awt.Graphics2D;
import java.awt.RenderingHints;
public class SliderStyleDefinePane extends MobileTemplateStyleDefinePane { public class SliderStyleDefinePane extends MobileTemplateStyleDefinePane {
private NewColorSelectBox initDotColor; private NewColorSelectBox initDotColor;
@ -131,6 +132,7 @@ public class SliderStyleDefinePane extends MobileTemplateStyleDefinePane {
Dimension dimension = this.getSize(); Dimension dimension = this.getSize();
int panelHeight = dimension.height; int panelHeight = dimension.height;
Graphics2D g2d = (Graphics2D) g.create(); Graphics2D g2d = (Graphics2D) g.create();
g2d.setRenderingHint(RenderingHints.KEY_ANTIALIASING, RenderingHints.VALUE_ANTIALIAS_ON);
FRFont frFont = this.getTabFontConfig().getFont(); FRFont frFont = this.getTabFontConfig().getFont();
g2d.setFont(frFont); g2d.setFont(frFont);
g2d.setColor(frFont.getForeground()); g2d.setColor(frFont.getForeground());

6
designer-base/src/main/java/com/fr/design/mainframe/mobile/ui/StyleDefinePaneWithSelectConf.java

@ -10,6 +10,7 @@ import com.fr.design.mainframe.widget.MobileTabFontConfPane;
import com.fr.design.style.color.NewColorSelectBox; import com.fr.design.style.color.NewColorSelectBox;
import com.fr.form.ui.container.cardlayout.WCardTagLayout; import com.fr.form.ui.container.cardlayout.WCardTagLayout;
import com.fr.general.cardtag.mobile.MobileTemplateStyle; import com.fr.general.cardtag.mobile.MobileTemplateStyle;
import com.fr.general.cardtag.mobile.TabFontConfig;
import javax.swing.BorderFactory; import javax.swing.BorderFactory;
import javax.swing.JPanel; import javax.swing.JPanel;
import javax.swing.event.ChangeEvent; import javax.swing.event.ChangeEvent;
@ -97,7 +98,10 @@ public abstract class StyleDefinePaneWithSelectConf extends MobileTemplateStyleD
public MobileTemplateStyle updateSubStyle() { public MobileTemplateStyle updateSubStyle() {
MobileTemplateStyle mobileTemplateStyle = updateStyleWithSelectConf(); MobileTemplateStyle mobileTemplateStyle = updateStyleWithSelectConf();
mobileTemplateStyle.setSelectColor(selectColorBox.getSelectObject()); mobileTemplateStyle.setSelectColor(selectColorBox.getSelectObject());
mobileTemplateStyle.getTabFontConfig().setSelectColor(selectFontColor.getColor()); TabFontConfig config = new TabFontConfig();
config.setFont(mobileTemplateStyle.getTabFontConfig().getFont());
config.setSelectColor(selectFontColor.getColor());
mobileTemplateStyle.setTabFontConfig(config);
return mobileTemplateStyle; return mobileTemplateStyle;
} }

4
designer-base/src/main/java/com/fr/design/mainframe/mobile/ui/UpMenuStyleDefinePane.java

@ -27,6 +27,7 @@ import java.awt.Dimension;
import java.awt.FontMetrics; import java.awt.FontMetrics;
import java.awt.Graphics; import java.awt.Graphics;
import java.awt.Graphics2D; import java.awt.Graphics2D;
import java.awt.RenderingHints;
import java.awt.Stroke; import java.awt.Stroke;
public class UpMenuStyleDefinePane extends StyleDefinePaneWithSelectConf { public class UpMenuStyleDefinePane extends StyleDefinePaneWithSelectConf {
@ -171,7 +172,8 @@ public class UpMenuStyleDefinePane extends StyleDefinePaneWithSelectConf {
int panelWidth = dimension.width; int panelWidth = dimension.width;
int panelHeight = dimension.height; int panelHeight = dimension.height;
Graphics2D g2d = (Graphics2D) g.create(); Graphics2D g2d = (Graphics2D) g.create();
FRFont frFont = UpMenuStyleDefinePane.this.fontConfPane.update(); g2d.setRenderingHint(RenderingHints.KEY_ANTIALIASING, RenderingHints.VALUE_ANTIALIAS_ON);
FRFont frFont = this.getTabFontConfig().getFont();
FontMetrics fm = GraphHelper.getFontMetrics(frFont); FontMetrics fm = GraphHelper.getFontMetrics(frFont);
WCardTagLayout cardTagLayout = UpMenuStyleDefinePane.this.getTagLayout(); WCardTagLayout cardTagLayout = UpMenuStyleDefinePane.this.getTagLayout();
int eachWidth = panelWidth / cardTagLayout.getWidgetCount(); int eachWidth = panelWidth / cardTagLayout.getWidgetCount();

Loading…
Cancel
Save