Tooltip is bigger than need in case of lack of space.

UIUtil: CSS update (it works but has some mistakes)
This commit is contained in:
Vassiliy
2014-03-18 15:05:21 +04:00
parent 0de1ef90d8
commit 58a9de5c7e
2 changed files with 5 additions and 6 deletions
@@ -501,7 +501,6 @@ public class BalloonImpl implements Balloon, IdeTooltip.Ui {
myComp.removeAll();
myLayeredPane.remove(myComp);
myForcedBounds = rec;
createComponent();
}
@@ -1739,14 +1739,14 @@ public class UIUtil {
public static String getCssFontDeclaration(final Font font, @Nullable Color fgColor, @Nullable Color linkColor, @Nullable String liImg) {
URL resource = liImg != null ? SystemInfo.class.getResource(liImg) : null;
@NonNls String fontFamilyAndSize = "font-family:" + font.getFamily() + "; font-size:" + font.getSize() + ";";
@NonNls String fontFamilyAndSize = "font-family:'" + font.getFamily() + "'; font-size:" + font.getSize() + "pt;";
@NonNls @Language("HTML")
String body = "body, div, td, p {" + fontFamilyAndSize + " " + (fgColor != null ? "color:" + ColorUtil.toHex(fgColor) : "") + "}";
String body = "body, div, td, p {" + fontFamilyAndSize + " " + (fgColor != null ? "color:#" + ColorUtil.toHex(fgColor)+";" : "") + "}\n";
if (resource != null) {
body += "ul {list-style-image: " + resource.toExternalForm() + "}";
body += "ul {list-style-image:url('" + resource.toExternalForm() + "');}\n";
}
@NonNls String link = linkColor != null ? "a {" + fontFamilyAndSize + " color:" + ColorUtil.toHex(linkColor) + "}" : "";
return "<style> " + body + " " + link + "</style>";
@NonNls String link = linkColor != null ? "a {" + fontFamilyAndSize + " color:#"+ColorUtil.toHex(linkColor) + ";}\n" : "";
return "<style>\n" + body + link + "</style>";
}
public static boolean isWinLafOnVista() {