Browse Source

Pull request #5490: CHART-20117 标签字体兼容,升级上来的自动显示跟随主题

Merge in DESIGN/design from ~BJORN/design:feature/x to feature/x

* commit '8afcd3a2aab6ba2861db6dbe31d739110f28a374':
  CHART-20117 标签字体兼容,升级上来的自动显示跟随主题
research/11.0
Bjorn 3 years ago
parent
commit
1b9d4b20ab
  1. 5
      designer-chart/src/main/java/com/fr/design/mainframe/chart/gui/style/ChartTextAttrPane.java
  2. 6
      designer-chart/src/main/java/com/fr/design/mainframe/chart/gui/style/ChartTextAttrPaneWithThemeStyle.java
  3. 2
      designer-chart/src/main/java/com/fr/van/chart/designer/component/VanChartTooltipContentPane.java

5
designer-chart/src/main/java/com/fr/design/mainframe/chart/gui/style/ChartTextAttrPane.java

@ -35,6 +35,7 @@ public class ChartTextAttrPane extends BasicPane {
private UIToggleButton italic;
private UIColorButton fontColor;
public static Integer[] FONT_SIZES = new Integer[FONT_END - FONT_START + 1];
static {
for (int i = FONT_START; i <= FONT_END; i++) {
FONT_SIZES[i - FONT_START] = i;
@ -88,6 +89,10 @@ public class ChartTextAttrPane extends BasicPane {
populate(frFont);
}
public void populate(TextAttr textAttr, boolean autoFont) {
populate(textAttr);
}
public void update(TextAttr textAttr) {
if (textAttr == null) {
textAttr = new TextAttr();

6
designer-chart/src/main/java/com/fr/design/mainframe/chart/gui/style/ChartTextAttrPaneWithThemeStyle.java

@ -80,7 +80,11 @@ public class ChartTextAttrPaneWithThemeStyle extends ChartTextAttrPane {
}
public void populate(TextAttr textAttr) {
if (textAttr.isThemed()) {
populate(textAttr, false);
}
public void populate(TextAttr textAttr, boolean autoFont) {
if (textAttr.isThemed() || autoFont) {
preButton.setSelectedIndex(PREDEFINED_STYLE);
} else {
preButton.setSelectedIndex(CUSTOM);

2
designer-chart/src/main/java/com/fr/van/chart/designer/component/VanChartTooltipContentPane.java

@ -632,7 +632,7 @@ public class VanChartTooltipContentPane extends BasicBeanPane<AttrTooltipContent
styleButton.setSelectedIndex(TEXT_ATTR_AUTO_INDEX);
}
}
this.textAttrPane.populate(attrTooltipContent.getTextAttr());
this.textAttrPane.populate(attrTooltipContent.getTextAttr(), !attrTooltipContent.isCustom());
}
htmlLabelPane.populate(attrTooltipContent.getHtmlLabel());

Loading…
Cancel
Save