fix hardcoded foreground

(cherry-picked from e5fd44a)
This commit is contained in:
Konstantin Bulenkov
2012-12-03 15:25:30 +01:00
parent c423d47a56
commit d654a80079
4 changed files with 18 additions and 3 deletions

View File

@@ -4,7 +4,7 @@
<build number="__BUILD_NUMBER__" date="__BUILD_DATE__"/>
<install-over minbuild="123.1" maxbuild="123.9999" version="12"/>
<logo url="/idea_community_logo.png" textcolor="ffffff" progressColor="ffaa16" progressY="230" progressTailIcon="/community_progress_tail.png"/>
<about url="/idea_community_about.png"/>
<about url="/idea_community_about.png" foreground="ffffff"/>
<icon size32="/icon_CE.png" size16="/icon_CEsmall.png" size32opaque="/icon_CEwhite.png" size12="/toolwindows/toolWindowProject.png"/>
<package code="__PACKAGE_CODE__"/>
<names product="IDEA" fullname="IntelliJ IDEA" script="idea"/>

View File

@@ -284,7 +284,8 @@ public class AboutDialog extends JDialog {
public void render(int indentX, int indentY, List<AboutBoxLine> lines) throws OverflowException {
x = indentX;
y = indentY;
g2.setColor(Color.white); //todo[kb] move to ApplicationInfo.xml
ApplicationInfoEx appInfo = (ApplicationInfoEx)ApplicationInfo.getInstance();
g2.setColor(appInfo.getAboutForeground());
for (int i = 0; i < lines.size(); i++) {
AboutBoxLine line = lines.get(i);
final String s = line.getText();

View File

@@ -1,5 +1,5 @@
/*
* Copyright 2000-2009 JetBrains s.r.o.
* Copyright 2000-2012 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.
@@ -94,6 +94,8 @@ public abstract class ApplicationInfoEx extends ApplicationInfo {
public abstract String getMacKeymapUrl();
public abstract Color getAboutForeground();
public interface UpdateUrls {
String getCheckingUrl();
String getPatchesUrl();

View File

@@ -50,6 +50,7 @@ public class ApplicationInfoImpl extends ApplicationInfoEx implements JDOMExtern
private String myCompanyName = "JetBrains s.r.o.";
private String myCompanyUrl = "http://www.jetbrains.com/";
private Color myProgressColor = null;
private Color myAboutForeground = Color.black;
private Icon myProgressTailIcon = null;
private int myProgressY = 350;
@@ -103,6 +104,7 @@ public class ApplicationInfoImpl extends ApplicationInfoEx implements JDOMExtern
@NonNls private static final String ATTRIBUTE_URL = "url";
@NonNls private static final String ATTRIBUTE_TEXT_COLOR = "textcolor";
@NonNls private static final String ATTRIBUTE_PROGRESS_COLOR = "progressColor";
@NonNls private static final String ATTRIBUTE_ABOUT_FOREGROUND_COLOR = "foreground";
@NonNls private static final String ATTRIBUTE_PROGRESS_Y = "progressY";
@NonNls private static final String ATTRIBUTE_PROGRESS_TAIL_ICON = "progressTailIcon";
@NonNls private static final String ELEMENT_ABOUT = "about";
@@ -326,6 +328,11 @@ public class ApplicationInfoImpl extends ApplicationInfoEx implements JDOMExtern
return myMacKeymapUrl;
}
@Override
public Color getAboutForeground() {
return myAboutForeground;
}
public String getFullApplicationName() {
@NonNls StringBuilder buffer = new StringBuilder();
buffer.append(getVersionName());
@@ -444,6 +451,11 @@ public class ApplicationInfoImpl extends ApplicationInfoEx implements JDOMExtern
Element aboutLogoElement = parentNode.getChild(ELEMENT_ABOUT);
if (aboutLogoElement != null) {
myAboutImageUrl = aboutLogoElement.getAttributeValue(ATTRIBUTE_URL);
String v = aboutLogoElement.getAttributeValue(ATTRIBUTE_ABOUT_FOREGROUND_COLOR);
if (v != null) {
myAboutForeground = parseColor(v);
}
}
Element iconElement = parentNode.getChild(ELEMENT_ICON);