mirror of
https://gitflic.ru/project/openide/openide.git
synced 2026-09-27 10:03:11 +07:00
IDEA-140577 NPE in splash screen
This commit is contained in:
@@ -166,7 +166,7 @@ public class Splash extends JDialog implements StartupProgress {
|
||||
if (ApplicationInfoImpl.getShadowInstance().showLicenseeInfo()) {
|
||||
final LicensingFacade provider = LicensingFacade.getInstance();
|
||||
if (provider != null) {
|
||||
UISettings.setupAntialiasing(g);
|
||||
UIUtil.applyRenderingHints(g);
|
||||
g.setFont(new Font(UIUtil.ARIAL_FONT_NAME, Font.BOLD, JBUI.scale(SystemInfo.isUnix ? 10 : 11)));
|
||||
|
||||
g.setColor(textColor);
|
||||
|
||||
@@ -1761,6 +1761,20 @@ public class UIUtil {
|
||||
return image;
|
||||
}
|
||||
|
||||
/** This method is intended to use when user settings are not accessible yet.
|
||||
* Use it to set up default RenderingHints.
|
||||
* @param g
|
||||
*/
|
||||
public static void applyRenderingHints(final Graphics g) {
|
||||
Graphics2D g2d = (Graphics2D)g;
|
||||
Toolkit tk = Toolkit.getDefaultToolkit();
|
||||
//noinspection HardCodedStringLiteral
|
||||
Map map = (Map)tk.getDesktopProperty("awt.font.desktophints");
|
||||
if (map != null) {
|
||||
g2d.addRenderingHints(map);
|
||||
}
|
||||
}
|
||||
|
||||
public static BufferedImage createImage(int width, int height, int type) {
|
||||
if (isRetina()) {
|
||||
return RetinaImage.create(width, height, type);
|
||||
|
||||
Reference in New Issue
Block a user