fix AA for help frame

This commit is contained in:
Konstantin Bulenkov
2011-07-12 19:51:34 +04:00
parent 7293879bc6
commit 5945de3d63
2 changed files with 25 additions and 2 deletions
@@ -1,5 +1,5 @@
/*
* Copyright 2000-2009 JetBrains s.r.o.
* Copyright 2000-2011 JetBrains s.r.o.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
@@ -15,9 +15,12 @@
*/
package com.intellij.help.impl;
import com.intellij.ide.ui.UISettings;
import javax.help.DefaultHelpModel;
import javax.help.HelpSet;
import javax.help.JHelp;
import java.awt.*;
import java.util.Vector;
/**
@@ -47,4 +50,10 @@ class IdeaJHelp extends JHelp{
updateUI();
}
@Override
public void paint(Graphics g) {
UISettings.setupAntialiasing(g);
super.paint(g);
}
}
@@ -1,5 +1,5 @@
/*
* Copyright 2000-2009 JetBrains s.r.o.
* Copyright 2000-2011 JetBrains s.r.o.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
@@ -15,8 +15,13 @@
*/
package com.intellij.help.impl;
import com.intellij.util.ui.UIUtil;
import sun.swing.SwingUtilities2;
import javax.help.JHelpContentViewer;
import javax.help.TextHelpModel;
import javax.swing.*;
import java.awt.*;
/**
* It a dirty patch! Help system is so ugly that it hangs when it open some "external" links.
@@ -43,4 +48,13 @@ class IdeaJHelpContentViewer extends JHelpContentViewer{
setUI(new IdeaHelpContentViewUI(this));
invalidate();
}
@Override
public void paint(Graphics g) {
final JEditorPane editorPane = UIUtil.findComponentOfType(this, JEditorPane.class);
if (editorPane != null) {
editorPane.putClientProperty(SwingUtilities2.AA_TEXT_PROPERTY_KEY, SwingUtilities2.AATextInfo.getAATextInfo(true));
}
super.paint(g);
}
}