[autocomplete] 54/143: AutoComplete: Description tool tip should try to set foreground color to Label.color; not all LAF's use a (close to) black for it (e.g. dark LAF's with light text). Java Language Support: Use AA when appropriate for Java completions (JavCellRenderer). JavaParser: Added getter to retrieve most recent CompilationUnit for an RSTA. JavaOutlineTree: Update renderer on LAF change, and make mouse selection of a tree node select that Java element in the editor. Token: Fixed a bug in addHtmlRepresentation() when including font family information in the HTML.

Benjamin Mesing ben at alioth.debian.org
Sat Oct 19 12:53:16 UTC 2013


This is an automated email from the git hooks/post-receive script.

ben pushed a commit to branch master
in repository autocomplete.

commit d4292d65a926d533df28fe5930973327892616b6
Author: bobbylight <robert at fifesoft.com>
Date:   Thu Nov 11 13:24:18 2010 +0000

    AutoComplete: Description tool tip should try to set foreground color to Label.color; not all LAF's use a (close to) black for it (e.g. dark LAF's with light text).
    Java Language Support: Use AA when appropriate for Java completions (JavCellRenderer).
    JavaParser: Added getter to retrieve most recent CompilationUnit for an RSTA.
    JavaOutlineTree: Update renderer on LAF change, and make mouse selection of a tree node select that Java element in the editor.
    Token: Fixed a bug in addHtmlRepresentation() when including font family information in the HTML.
---
 src/org/fife/ui/autocomplete/TipUtil.java |   14 ++++++++++++--
 1 file changed, 12 insertions(+), 2 deletions(-)

diff --git a/src/org/fife/ui/autocomplete/TipUtil.java b/src/org/fife/ui/autocomplete/TipUtil.java
index b1b8851..cbf838a 100644
--- a/src/org/fife/ui/autocomplete/TipUtil.java
+++ b/src/org/fife/ui/autocomplete/TipUtil.java
@@ -102,6 +102,15 @@ class TipUtil {
 		// Make selection visible even though we are not (initially) focusable.
 		textArea.getCaret().setSelectionVisible(true);
 
+		// Set the foreground color.  Important because when rendering HTML,
+		// default foreground becomes black, which may not match all LAF's
+		// (e.g. Substance).
+		Color fg = UIManager.getColor("Label.foreground");
+		if (fg==null) {
+			fg = SystemColor.text;
+		}
+		textArea.setForeground(fg);
+
 		// Make it use the "tool tip" background color.
 		textArea.setBackground(TipUtil.getToolTipBackground());
 
@@ -113,8 +122,9 @@ class TipUtil {
 		}
 		HTMLDocument doc = (HTMLDocument) textArea.getDocument();
 		doc.getStyleSheet().addRule(
-				"body { font-family: " + font.getFamily() + "; font-size: "
-						+ font.getSize() + "pt; }");
+				"body { font-family: " + font.getFamily() +
+						"; font-size: " + font.getSize() + "pt" +
+						"; color: " + Util.getHexString(fg) + "; }");
 		URL url = TipUtil.class.getResource("bullet_black.png");
 		if (url!=null) {
 			doc.getStyleSheet().addRule(

-- 
Alioth's /usr/local/bin/git-commit-notice on /srv/git.debian.org/git/pkg-java/autocomplete.git



More information about the pkg-java-commits mailing list