Browse Source

Pull request #6643: REPORT-62433 11.0设计器-单元格样式-有部分样式显示的字体内容不全

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

* commit 'a682e7d9a0907020f4b6e291c77b6fa6865fd901':
  REPORT-62543 在线组件页面的搜索框失效
  REPORT-62433 11.0设计器-单元格样式-有部分样式显示的字体内容不全
feature/x
starryi 3 years ago
parent
commit
a405202d86
  1. 7
      designer-base/src/main/java/com/fr/design/cell/CellStylePreviewPane.java
  2. 6
      designer-form/src/main/java/com/fr/design/mainframe/share/ui/online/AbstractOnlineWidgetShowPane.java

7
designer-base/src/main/java/com/fr/design/cell/CellStylePreviewPane.java

@ -12,6 +12,7 @@ import java.awt.Composite;
import java.awt.Dimension; import java.awt.Dimension;
import java.awt.Graphics; import java.awt.Graphics;
import java.awt.Graphics2D; import java.awt.Graphics2D;
import java.awt.RenderingHints;
import java.awt.image.BufferedImage; import java.awt.image.BufferedImage;
/** /**
@ -44,10 +45,14 @@ public class CellStylePreviewPane extends JPanel {
public void paint(Graphics g) { public void paint(Graphics g) {
Graphics2D g2d = (Graphics2D) g; Graphics2D g2d = (Graphics2D) g;
g.clearRect(0, 0, getWidth(), getHeight()); g.clearRect(0, 0, getWidth(), getHeight());
g2d.setRenderingHint(RenderingHints.KEY_ANTIALIASING, RenderingHints.VALUE_ANTIALIAS_ON);
g2d.setRenderingHint(RenderingHints.KEY_TEXT_ANTIALIASING, RenderingHints.VALUE_TEXT_ANTIALIAS_ON);
paintTransparentBackground(g2d, style); paintTransparentBackground(g2d, style);
paintCellStyle(g2d, style); paintCellStyle(g2d, style);
g2d.setRenderingHint(RenderingHints.KEY_ANTIALIASING, RenderingHints.VALUE_ANTIALIAS_OFF);
g2d.setRenderingHint(RenderingHints.KEY_TEXT_ANTIALIASING, RenderingHints.VALUE_TEXT_ANTIALIAS_OFF);
} }
private void paintTransparentBackground(Graphics2D g2d, Style style) { private void paintTransparentBackground(Graphics2D g2d, Style style) {

6
designer-form/src/main/java/com/fr/design/mainframe/share/ui/online/AbstractOnlineWidgetShowPane.java

@ -130,11 +130,11 @@ public abstract class AbstractOnlineWidgetShowPane extends JPanel {
this.mainCardLayout.show(mainCenterPane, MAIN_FILTER_TAB_PANE); this.mainCardLayout.show(mainCenterPane, MAIN_FILTER_TAB_PANE);
return; return;
} }
List<OnlineShareWidget> widgets = new ArrayList<>(); List<OnlineShareWidget> searchedWidgetList = new ArrayList<>();
if (StringUtils.isNotEmpty(text)) { if (StringUtils.isNotEmpty(text)) {
for (OnlineShareWidget provider : sharableWidgetProviders) { for (OnlineShareWidget provider : sharableWidgetProviders) {
if (provider.getName().toLowerCase().contains(text)) { if (provider.getName().toLowerCase().contains(text)) {
widgets.add(provider); searchedWidgetList.add(provider);
} }
} }
} }
@ -142,7 +142,7 @@ public abstract class AbstractOnlineWidgetShowPane extends JPanel {
if (searchResultShowPane != null) { if (searchResultShowPane != null) {
mainCenterPane.remove(searchResultShowPane); mainCenterPane.remove(searchResultShowPane);
} }
searchResultShowPane = manualCreateOnlineWidgetSelectPane(sharableWidgetProviders); searchResultShowPane = manualCreateOnlineWidgetSelectPane(searchedWidgetList.toArray(new OnlineShareWidget[]{}));
this.mainCenterPane.add(searchResultShowPane, SEARCH_RESULT_PANE); this.mainCenterPane.add(searchResultShowPane, SEARCH_RESULT_PANE);
this.mainCardLayout.show(mainCenterPane, SEARCH_RESULT_PANE); this.mainCardLayout.show(mainCenterPane, SEARCH_RESULT_PANE);
this.validate(); this.validate();

Loading…
Cancel
Save