mirror of
https://gitflic.ru/project/openide/openide.git
synced 2026-09-27 10:03:11 +07:00
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:
@@ -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() {
|
||||
|
||||
Reference in New Issue
Block a user