Browse Source

REPORT-60488 视觉优化

research/11.0
kuangshuai 3 years ago
parent
commit
a064c43c97
  1. 2
      designer-base/src/main/java/com/fr/design/mainframe/guide/base/GuideView.java
  2. 6
      designer-base/src/main/java/com/fr/design/mainframe/guide/ui/bubble/BubbleWithClose.java
  3. 2
      designer-base/src/main/java/com/fr/design/mainframe/guide/utils/ScreenImage.java
  4. BIN
      designer-base/src/main/resources/com/fr/design/mainframe/guide/close.png
  5. 4
      designer-realize/src/main/java/com/fr/design/mainframe/guide/creator/GuideCreateUtils.java

2
designer-base/src/main/java/com/fr/design/mainframe/guide/base/GuideView.java

@ -37,7 +37,7 @@ public class GuideView extends JDialog {
this.setUndecorated(true); this.setUndecorated(true);
this.window = window; this.window = window;
this.modalColor = Color.BLACK; this.modalColor = Color.BLACK;
this.modalOpacity = 0.4f; this.modalOpacity = 0.6f;
this.setPreferredSize(window.getSize()); this.setPreferredSize(window.getSize());
this.setSize(window.getSize()); this.setSize(window.getSize());
this.setLayout(FRGUIPaneFactory.createBorderLayout()); this.setLayout(FRGUIPaneFactory.createBorderLayout());

6
designer-base/src/main/java/com/fr/design/mainframe/guide/ui/bubble/BubbleWithClose.java

@ -7,6 +7,7 @@ import com.fr.design.gui.ibutton.UIButton;
import com.fr.general.IOUtils; import com.fr.general.IOUtils;
import com.fr.stable.StringUtils; import com.fr.stable.StringUtils;
import javax.swing.Icon;
import javax.swing.JTextPane; import javax.swing.JTextPane;
import javax.swing.text.SimpleAttributeSet; import javax.swing.text.SimpleAttributeSet;
import javax.swing.text.StyleConstants; import javax.swing.text.StyleConstants;
@ -32,6 +33,7 @@ import java.text.AttributedString;
public class BubbleWithClose extends Bubble { public class BubbleWithClose extends Bubble {
private static final Font FONT = new Font(Font.SANS_SERIF, Font.PLAIN, 14); private static final Font FONT = new Font(Font.SANS_SERIF, Font.PLAIN, 14);
private static final Icon ICON = IOUtils.readIcon("/com/fr/design/mainframe/guide/close.png");
private static final int HEADER_HEIGHT = 24; private static final int HEADER_HEIGHT = 24;
private static final Color HEADER_COLOR = new Color(245, 245, 246); private static final Color HEADER_COLOR = new Color(245, 245, 246);
private static final Color TITLE_COLOR = new Color(51, 51, 52); private static final Color TITLE_COLOR = new Color(51, 51, 52);
@ -112,9 +114,9 @@ public class BubbleWithClose extends Bubble {
private void createCloseButton() { private void createCloseButton() {
closeButton = new UIButton(); closeButton = new UIButton();
closeButton.setIcon(IOUtils.readIcon("/com/fr/design/mainframe/guide/close.png")); closeButton.setIcon(ICON);
closeButton.set4ToolbarButton(); closeButton.set4ToolbarButton();
closeButton.setPreferredSize(new Dimension(16, 16)); closeButton.setPreferredSize(new Dimension(12, 12));
closeButton.setRolloverEnabled(false); closeButton.setRolloverEnabled(false);
closeButton.setPressedPainted(false); closeButton.setPressedPainted(false);
this.add(closeButton); this.add(closeButton);

2
designer-base/src/main/java/com/fr/design/mainframe/guide/utils/ScreenImage.java

@ -61,7 +61,7 @@ public class ScreenImage {
BufferedImage image = new BufferedImage(region.width, region.height, BufferedImage.TYPE_INT_RGB); BufferedImage image = new BufferedImage(region.width, region.height, BufferedImage.TYPE_INT_RGB);
Graphics2D g2d = image.createGraphics(); Graphics2D g2d = image.createGraphics();
g2d.drawImage(createImage(component), 0, 0, null); g2d.drawImage(createImage(component), 0, 0, null);
g2d.setComposite(AlphaComposite.getInstance(AlphaComposite.SRC_OVER, 0.4f)); g2d.setComposite(AlphaComposite.getInstance(AlphaComposite.SRC_OVER, 0.6f));
g2d.setColor(Color.BLACK); g2d.setColor(Color.BLACK);
g2d.fillRect(0, 0, region.width, region.height); g2d.fillRect(0, 0, region.width, region.height);
g2d.dispose(); g2d.dispose();

BIN
designer-base/src/main/resources/com/fr/design/mainframe/guide/close.png

Binary file not shown.

Before

Width:  |  Height:  |  Size: 375 B

After

Width:  |  Height:  |  Size: 1.1 KiB

4
designer-realize/src/main/java/com/fr/design/mainframe/guide/creator/GuideCreateUtils.java

@ -168,7 +168,9 @@ public class GuideCreateUtils {
} }
public static void deleteGuideFile(String filePath) { public static void deleteGuideFile(String filePath) {
WorkContext.getWorkResource().delete(filePath); if (filePath != null) {
WorkContext.getWorkResource().delete(filePath);
}
} }
public static void showDialogWithoutModal(JDialog dialog) { public static void showDialogWithoutModal(JDialog dialog) {

Loading…
Cancel
Save