Browse Source

CHART-22076 fix:fvs.cpt 单元格设置超链删除超链 文本白色

zheng-1641779399395
shine 3 years ago
parent
commit
75a342690c
  1. 7
      designer-base/src/main/java/com/fr/design/utils/gui/AdjustWorkBookDefaultStyleUtils.java
  2. 3
      designer-realize/src/main/java/com/fr/design/mainframe/HyperlinkGroupPaneActionImpl.java

7
designer-base/src/main/java/com/fr/design/utils/gui/AdjustWorkBookDefaultStyleUtils.java

@ -17,6 +17,7 @@ public class AdjustWorkBookDefaultStyleUtils {
private static final Color TEMPLATE_BACKGROUND = new Color(16, 11, 43);
private static final Color CELL_ELEMENT_BORDER = new Color(110, 110, 110);
private static final Color CELL_ELEMENT_FONT_FOREGROUND = Color.WHITE;
private static Color currentStoryBack = null;
@ -31,7 +32,7 @@ public class AdjustWorkBookDefaultStyleUtils {
public static void adjustCellElement(CellElement cellElement) {
if (DesignModeContext.isDuchampMode()) {
Style style = cellElement.getStyle();
style = style.deriveFRFont(style.getFRFont().applyForeground(Color.WHITE));
style = style.deriveFRFont(style.getFRFont().applyForeground(CELL_ELEMENT_FONT_FOREGROUND));
style = style.deriveBorder(0, CELL_ELEMENT_BORDER,
0, CELL_ELEMENT_BORDER,
0, CELL_ELEMENT_BORDER,
@ -40,6 +41,10 @@ public class AdjustWorkBookDefaultStyleUtils {
}
}
public static Color adjustCellElementFontForeground(Color color) {
return DesignModeContext.isDuchampMode() ? CELL_ELEMENT_FONT_FOREGROUND : color;
}
public static void adjustFloatElement(FloatElement floatElement) {
if (DesignModeContext.isDuchampMode()) {
Style style = floatElement.getStyle();

3
designer-realize/src/main/java/com/fr/design/mainframe/HyperlinkGroupPaneActionImpl.java

@ -6,6 +6,7 @@ import com.fr.design.designer.TargetComponent;
import com.fr.design.file.HistoryTemplateListCache;
import com.fr.design.gui.frpane.HyperlinkGroupPane;
import com.fr.design.gui.frpane.HyperlinkGroupPaneActionProvider;
import com.fr.design.utils.gui.AdjustWorkBookDefaultStyleUtils;
import com.fr.general.FRFont;
import com.fr.grid.selection.CellSelection;
import com.fr.grid.selection.FloatSelection;
@ -82,7 +83,7 @@ public class HyperlinkGroupPaneActionImpl implements HyperlinkGroupPaneActionPro
frFont = frFont.applyForeground(Color.blue);
frFont = frFont.applyUnderline(Constants.LINE_THIN);
} else {
frFont = frFont.applyForeground(Color.black);
frFont = frFont.applyForeground(AdjustWorkBookDefaultStyleUtils.adjustCellElementFontForeground(Color.black));
frFont = frFont.applyUnderline(Constants.LINE_NONE);
}
editCellElement.setStyle(elementStyle.deriveFRFont(frFont));

Loading…
Cancel
Save